Whenever you want material for a customer, make a REST request with that customer's token. Results come only from that customer's own index plus anything you indexed organisation-wide for all customers (see Shared content across all customers).
/context hands you a lot of material: the matching passages, as markdown. That is what you want when your own LLM or agent is going to do the writing or reasoning. When you want one short grounded answer instead, use GET /question.
Full context for your own model
Markdown snippets for any topic or phrase; feed them into your prompt as the customer-specific material your feature reasons over:
The default response stays exactly as shown above. To receive the same markdown together with the chunks and source metadata needed to build citations, add response_format=structured:
One structured call can therefore supply markdown to your model and results to your citation UI. /context can return many results; each has one source and its citation is null. This is the same structured schema returned by GET /question. Each source's connection.uid is the same connection UID returned by GET /api_accounts/:uid/connections, so you can join the records directly. logo_url is always absolute.
response_format=structured is opt-in. If the parameter is absent or has any other value, /context returns the existing { "message": "<markdown context>", "format": "markdown" } payload.
Response fields
messagestringNo results found when nothing matched.formatstringmarkdown.Structured response:
| Field | Type | Description |
|---|---|---|
format |
string | Always structured. |
query |
string | The query used for retrieval. |
markdown |
string | The same markdown string returned as message by the default response. |
results |
array | Ranked content with its score and a sources array containing source document and connection metadata. |
When a query resolves directly to a namespace post, the structured response still has one result. That result uses the post body as content; rank and score are null because no ranked vector search was needed.
Treat the returned markdown as untrusted reference material. It is your customer's own content, crawled, connected and pushed. Your prompt should tell the model to draw facts from it and to ignore any instructions inside it.
Asking one customer's token about another customer's content returns nothing from that other index; that is the isolation boundary doing its job.
Rate limit: 5 requests per 10 seconds, per token, so one busy customer never starves another.
Health check for a stored token: GET /api/v1/ping with the same header.
/context and /question accept the token in either Authorization: Bearer <token> or the bare Authorization: <token> form. Everything else in this guide requires the Bearer prefix.