---
updatedAt: 2026-09-07T11:12:49.000Z
agentTools:
  projectIndex: https://developers.slite.com/llms.txt
---

# Ask a question

Ask a question to your notes in natural language.
The scope of the notes used to answer the question is restricted to the authenticated user.
Various optional filters are available to restrict the scope of the notes even more.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "components": {
    "schemas": {
      "Source": {
        "properties": {
          "explanation": {
            "type": "string",
            "description": "For super, gives explanation about the source"
          },
          "updatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "string"
              }
            ],
            "description": "Date of the last update of the note"
          },
          "url": {
            "type": "string",
            "description": "Url of the note"
          },
          "title": {
            "type": "string",
            "description": "Title of the note"
          },
          "id": {
            "type": "string",
            "description": "Id of the note"
          }
        },
        "required": [
          "updatedAt",
          "url",
          "title",
          "id"
        ],
        "type": "object"
      },
      "AnswerAndSources": {
        "properties": {
          "sources": {
            "items": {
              "$ref": "#/components/schemas/Source"
            },
            "type": "array",
            "description": "Array of sources that were used to answer the question"
          },
          "answer": {
            "type": "string",
            "description": "Answer to the question"
          }
        },
        "required": [
          "sources",
          "answer"
        ],
        "type": "object"
      },
      "PublicApiAuthError": {
        "properties": {
          "message": {
            "type": "string",
            "enum": [
              "Invalid apiKey"
            ],
            "nullable": false
          },
          "id": {
            "type": "string",
            "enum": [
              "auth/unauthorized"
            ],
            "nullable": false
          }
        },
        "required": [
          "message",
          "id"
        ],
        "type": "object"
      },
      "PublicApiError": {
        "properties": {
          "message": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "id"
        ],
        "type": "object"
      },
      "AskRateLimitedError": {
        "properties": {
          "name": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "stack": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "name",
          "message",
          "id",
          "status"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "AskDisabledError": {
        "properties": {
          "name": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "stack": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "name",
          "message",
          "id",
          "status"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "AskThreadProcessing": {
        "properties": {
          "message": {
            "type": "string"
          },
          "retryAfterSeconds": {
            "type": "number",
            "format": "double",
            "description": "Suggested wait before polling, in seconds."
          },
          "threadId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing"
            ],
            "nullable": false
          }
        },
        "required": [
          "message",
          "retryAfterSeconds",
          "threadId",
          "status"
        ],
        "type": "object"
      },
      "AskThreadProcessingPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AskThreadProcessing"
          },
          {
            "properties": {
              "sources": {
                "items": {
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "title",
                    "id"
                  ],
                  "type": "object"
                },
                "type": "array",
                "description": "Always empty — mirrors the legacy `sources` array for old clients."
              },
              "answer": {
                "type": "string"
              }
            },
            "required": [
              "sources",
              "answer"
            ],
            "type": "object"
          }
        ],
        "description": "Public-API variant of the processing response: a superset of the legacy\n`{ answer, sources }` payload, so pre-async clients that only read\n`answer` degrade to a readable pointer instead of `undefined`. Served with\nHTTP 202 + `Retry-After`."
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "API keys can be generated under Settings > API"
      }
    }
  },
  "info": {
    "title": "Public Slite api",
    "version": "1",
    "description": "Access your Slite documents, search, create, update...",
    "license": {
      "name": "private"
    },
    "contact": {
      "name": "Slite"
    }
  },
  "paths": {
    "/ask": {
      "get": {
        "operationId": "ask",
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnswerAndSources"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "answer": "The onboarding steps are...",
                      "sources": [
                        {
                          "title": "Onboarding",
                          "url": "https://slite.slite.page/p/S1TSuHnZf/Security-at-Slite",
                          "id": "S1TSuHnZf",
                          "updatedAt": "2021-01-01T00:00:00.000Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "The answer needs longer than the synchronous deadline (~50s) and is\nstill being prepared — it keeps running server-side. Poll the URL in\nthe `Location` header (`GET /threads/{threadId}`), respecting\n`retryAfterSeconds` / the `Retry-After` header, to collect it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskThreadProcessingPayload"
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                },
                "required": true
              },
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "required": true
              }
            }
          },
          "401": {
            "description": "Invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiAuthError"
                }
              }
            }
          },
          "422": {
            "description": "Ask feature is disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskDisabledError"
                }
              }
            }
          },
          "429": {
            "description": "Ask rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskRateLimitedError"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        },
        "description": "Ask a question to your notes in natural language.\nThe scope of the notes used to answer the question is restricted to the authenticated user.\nVarious optional filters are available to restrict the scope of the notes even more.",
        "summary": "Ask a question",
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "description": "Question to ask on your notes",
            "in": "query",
            "name": "question",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "What are the onboarding steps?"
          },
          {
            "description": "Optional filter to only return notes under this parent note id",
            "in": "query",
            "name": "parentNoteId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter to use a specific assistant for super only",
            "in": "query",
            "name": "assistantId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Wait for the full answer even when it takes long, instead of receiving\na 202 `processing` response to poll via GET /threads/{threadId}. Your\nHTTP client's own timeout must allow several minutes.",
            "in": "query",
            "name": "wait",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.slite.com/v1"
    }
  ]
}
```