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 has an enforced model policy, it takes precedence over workspace_model and your requested value is ignored. This is not an error — the request succeeds on the policy’s model. Read the workspace_model SSE event to see what ran.
An unrecognized or malformed model id is rejected with 400 before the stream opens, so a typo fails fast rather than silently running on a different model. The permitted set is a fixed list, not every Claude model that exists. Currently claude-opus-4-7, claude-opus-4-8 and claude-opus-5 (with or without the [1m] suffix). Requesting anything else returns 400 with workspace_model is not permitted in this environment. Ask us if you need a model that is not on the list.

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
enum<string> | null

Optional. LLM model to run this request with, e.g. claude-opus-4-7. When omitted, the model configured for your organization is used. An enforced organization-level model policy takes precedence over this field. 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.

Available options:
claude-opus-4-7,
claude-opus-4-8,
claude-opus-5,
claude-opus-4-7[1m],
claude-opus-4-8[1m],
claude-opus-5[1m]
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