Ask Content
Search Endpoints
Ask Content
AI-powered Q&A grounded in your project’s content
Ask Content
Answers a natural language question using content from your project as context. The endpoint first performs semantic retrieval to find relevant content, then sends the context to an LLM to generate a grounded answer. Responds via Server-Sent Events (SSE) for streaming output.
Requires a paid plan with semantic search enabled.
Requires an authenticated user. Send the user’s access token as
Each source object follows the same shape as the Search Content response —
Only returned when headers have not yet been sent (i.e., before streaming starts).
Authorization: Bearer <token>. Requests without a valid token are rejected before any work is done — missing token → 401, invalid/expired token → 403 (refresh the access token and retry).
Body Parameters
string
required
The question to answer. Typos and ambiguous phrasing are handled gracefully.
string[]
default:"[\"entity\", \"comment\", \"message\"]"
Content types to use as context. Any combination of
entity, comment, message.string
Restrict the context lookup to a specific space.
boolean
default:"false"
Only applies with a
spaceId. When true, the context lookup also includes every space nested under it — children, grandchildren, the whole subtree at any depth — not just the named space. Use it to ask across a community and all of its channels at once. Ignored without a spaceId.string
Restrict message context lookup to a specific conversation.
number
default:"20"
Maximum number of content chunks to retrieve for context. Maximum
50.Query Parameters
Space-scoped reputation
This endpoint has a space in context, so it accepts the opt-in reputation params. They add aspaceReputation field to each source record’s populated user, alongside the always-present reputation total. Requires the reputation bundle. See the Reputation data model for the full contract.
Response
The response is a Server-Sent Events stream withContent-Type: text/event-stream. Three event types are emitted:
token — streamed LLM answer tokens:
sources — the content records used as context, sent after the answer is complete:
sourceType, similarity, and a fully populated record. An empty array is sent when no relevant context was found.
done — signals the stream is finished:
If no relevant content is found above the similarity threshold, the LLM response is skipped and the answer event immediately says “I couldn’t find any relevant content to answer your question.”
Error Responses
Authentication Required — 401 / 403
Authentication Required — 401 / 403
The endpoint requires an authenticated user. A missing token returns a bare
401; an invalid or expired token returns a bare 403 — refresh the access token and retry. These are returned before streaming starts.Plan Required — 403
Plan Required — 403
Error Event (during stream)
Error Event (during stream)
If an error occurs after streaming starts:

