Skip to main content
POST

Referencing Vault documents

To chat over documents you uploaded through the Vault endpoints, pass their rms_document_id (returned by Vault — Confirm Upload) in search_types.rms[].document_ids, and set source to "vault":
source: "vault" is required for Vault documents. If you omit it, the document is searched generically — it is not retrieved for direct file citation, the answer’s [N] markers won’t resolve, and GET /v2/analytics/conversations/{id}/references returns an empty list (the answer may still look complete, so this fails silently).
  • document_ids are rms_document_id values from confirm (poll Document Status until Synced first) — not the presign document_id.
  • workspace must match the workspace the document was uploaded into (the workspace sent to presigned_url / confirm).

Selecting a model

Pass workspace_model to run a request on a specific model:
Omit it and the model configured for your organization is used — the default for almost all requests. Reach for it when a particular query needs more (or less) capability than your default. The model that actually ran is reported on the workspace_model SSE event, so you can always confirm which one served the request:
The reported id carries a [1m] suffix marking the 1M-context runtime the model ran under. It is appended to every Claude model, so the reported value will not string-match a bare id you sent.Both forms are accepted on the way in (claude-opus-4-7 and claude-opus-4-7[1m] are equivalent), so you can send back whatever you read. To compare, strip the suffix on either side.
If your organization pins a model, that pin wins: asking for a different model is refused after the stream opens — 200, then a status event carrying error, not a silent success on the pinned model. Omit workspace_model to run on the pin. Read the workspace_model SSE event to see what ran.
A malformed model id — one that does not match the Claude model id format — is rejected with 400 before the stream opens. Passing that check is not the same as being able to run. An id that is well-formed but is not a real model, or is a real model your organization is not configured to use, is refused only after the stream has opened: you receive 200, then a status event carrying error — not a 400. Tell us which models you need and we will enable them.

Authorizations

X-API-KEY
string
header
required

Body

application/json
query
string
required

The analytics query to process.

Example:

"What are the latest insights on AAPL earnings?"

organization_id
string<uuid>

Organization ID

user_id
string<uuid>

User ID

user_email
string<email>

User email

user_name
string

User name

conversation_id
string | null

Existing conversation ID for multi-turn continuation. Omit or null for new conversation.

search_types
object | null

Structured source selection. Controls which document sources to query. Omitting a category means don't search it.

filters
object | null

Metadata filters. Hard filters exclude non-matching documents (AND between fields, OR within arrays). Soft filters boost relevance without excluding.

connectors
object[] | null

Customer MCP connectors to enable for this analytics request.

disabled_connectors
string[] | null

Connector names to disable for this analytics request.

workspace_model
string | null

Optional. LLM model to run this request with, e.g. claude-opus-4-7, claude-opus-5 or claude-opus-5-5. When omitted, the model configured for your organization is used. If your organization pins a model, that pin wins and requesting a different model is refused after the stream opens rather than silently succeeding on the pin; omit this field to run on the pin. The model that actually ran is reported on the workspace_model SSE event — note that the reported id carries a [1m] 1M-context suffix (e.g. claude-opus-4-7[1m]), so it does not string-match a bare id you sent. Both forms are accepted on input, so the reported id can be sent back as-is. A malformed id is rejected with 400 before the stream opens; an id that is well-formed but not available to your organization is refused after the stream opens, as a status event carrying error on a 200.

Pattern: ^claude-(?:opus|sonnet|haiku)-[\w.-]{1,40}(?:\[1m\])?$
Example:

"claude-opus-4-7"

Response

SSE stream of analytics events. Each event is sent as data: {json}\n\n. Events follow the sequence: conversation → message → status:start → [agentic loop] → answer → status:finish. status:keep_alive and keepalive events are sent periodically during long tool execution gaps.

Conversation event

event_name
enum<string>
required
Available options:
conversation
data
object
required

Event-specific data payload