Skip to content
v1

Reference Published assistants

Published assistants

Discover and run current published assistants without exporting their instructions.

Run a published assistant

Use POST /v1/assistants/options to obtain current enabled selections. Pass the returned opaque reference and a user message to POST /v1/assistants/runs. A later publication invalidates an earlier selection. These operations never author, enable or publish an assistant.

The API returns an asynchronous operation. Observe it until completion; admission alone does not mean a reply exists. Read the completed conversation through the separately authorized conversation-content endpoint. An API message does not establish ownership of a phone number or grant permission to contact someone.

Discover currently published chat assistants

POST /v1/assistants/options

Returns bounded published assistant names and exact serving versions, bound to this integration and team. Drafts, disabled assistants, private instructions, tool configuration and workflow/provider identifiers are excluded. This read changes no configuration; a newer publication invalidates the selection.

Scopes
assistants:run
Rate limit
Read

Headers

  • Totem-Team string Conditional ID prefix team_…

    The team to read, as a team_… id. Omit it when the key reads one team; it is required when the key reads several (400 team_required). When you send it, it must name a team the key reads: a malformed id gets 400 invalid_request, and a team outside the key gets 404 team_not_accessible, as does a request without it once the key reads no team at all.

Returns

Returns an AssistantOptions object.

Errors

+ 12 common errors

POST /v1/assistants/options
# Fictional fixtures: replace references and dates with current API values.
# Send consent or confirmation attestations only after the person confirms.
curl -X POST 'https://api.totemstudio.ai/v1/assistants/options' \
  -H "Authorization: Bearer $TOTEM_API_KEY" \
  -H "Totem-Team: $TOTEM_TEAM_ID" \
  -H "Content-Type: application/json" \
  --data '{}'
Response · 200JSON
{
  "object": "assistant_options",
  "data": [
    {
      "reference": "tast1.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
      "name": "Example assistant",
      "version": 1
    }
  ],
  "complete": true
}

Run a currently published chat assistant

POST /v1/assistants/runs

Admits a real API-origin turn through the published assistant gateway and existing execution, prepaid and contact rules; an existing conversation must belong to this integration and assistant. Current caller authority is checked before execution and every delegated effect; only an actual retained completed reply produces a completed-run receipt. Read reply text separately through conversations.messages with its independent content grant, reuse Idempotency-Key and never redispatch outcome_unknown.

Scopes
assistants:run
Rate limit
write

Headers

  • Totem-Team string Conditional ID prefix team_…

    The team to read, as a team_… id. Omit it when the key reads one team; it is required when the key reads several (400 team_required). When you send it, it must name a team the key reads: a malformed id gets 400 invalid_request, and a team outside the key gets 404 team_not_accessible, as does a request without it once the key reads no team at all.

  • Idempotency-Key string Required 1–255 chars Pattern ^[\x21-\x7e]+$

    One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.

Request body

Execute the current published chat assistant through its canonical gateway. Admission is asynchronous; queued or pending does not mean an assistant reply completed.

  • reference string Required ≤ 16384 chars Pattern ^tast1\.[A-Za-z0-9_-]+$

    Short-lived opaque selection bound to this integration and the exact currently published assistant version; never a provider or workflow identifier.

  • message string Required 1–4000 chars

    User message for this real API-origin chat turn; it never proves a phone, transport identity or consent.

  • conversation_id string ID prefix conv_…

    Optional retained API-origin conversation owned by this same integration and selected assistant. Omit to begin a new session.

Returns

Returns an Operation object.

Errors

+ 12 common errors

POST /v1/assistants/runs
# Fictional fixtures: replace references and dates with current API values.
# Send consent or confirmation attestations only after the person confirms.
curl -X POST 'https://api.totemstudio.ai/v1/assistants/runs' \
  -H "Authorization: Bearer $TOTEM_API_KEY" \
  -H "Totem-Team: $TOTEM_TEAM_ID" \
  -H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
  -H "Content-Type: application/json" \
  --data '{"reference": "tast1.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", "message": "What does the first visit include?"}'
Response · 202JSON
{
  "object": "operation",
  "id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
  "status": "queued",
  "endpoint": "assistants.run",
  "created_at": "2026-10-01T09:30:00.000Z",
  "updated_at": "2026-10-01T09:30:00.000Z",
  "result": null,
  "error": null
}

The AssistantOptions object

Metadata-only published assistant discovery; no prompts, tool configuration or provider selectors.

Attributes

  • object string

    Always assistant_options.

  • data Array<object> ≤ 50 items

    Bounded current published selections. Draft and disabled assistants are omitted.

  • complete boolean

    Whether this bounded discovery inspected every current assistant definition.

AssistantOptions · exampleJSON
{
  "object": "assistant_options",
  "data": [
    {
      "reference": "tast1.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
      "name": "Example assistant",
      "version": 1
    }
  ],
  "complete": true
}

The AssistantRunReceipt object

Content-free completed-run metadata. It never exports the reply, prompt, private source or provider identifiers.

Attributes

  • object string

    Always assistant_run_receipt.

  • status string

    The original canonical turn completed with an actual retained assistant reply, not merely queue admission.

  • conversation_id string ID prefix conv_…

    Opaque current conversation. Read reply bodies through conversations.messages with its separate current content grant.

AssistantRunReceipt · exampleJSON
{
  "object": "assistant_run_receipt",
  "status": "completed",
  "conversation_id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ"
}

API version 1.0.0