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.
POST /
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.
Headers
Totem-Teamstring Conditional ID prefixteam_…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 gets400 invalid_request, and a team outside the key gets404 team_not_accessible, as does a request without it once the key reads no team at all.
Returns
Returns an AssistantOptions object.
objectstringAlways assistant_options.
dataArray<object> ≤ 50 itemsBounded current published selections. Draft and disabled assistants are omitted.
referencestring ≤ 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.
namestring 1–200 charsPublished assistant display name, without its private instructions.
versionintegerExact current published version. A later publication invalidates this selection.
completebooleanWhether this bounded discovery inspected every current assistant definition.
Errors
- 400
team_requiredTeam required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 404
team_not_accessibleTeam not accessible - 409
capture_not_readyTeam data is still being prepared
# 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 '{}'{
"object": "assistant_options",
"data": [
{
"reference": "tast1.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"name": "Example assistant",
"version": 1
}
],
"complete": true
}POST /
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.
Headers
Totem-Teamstring Conditional ID prefixteam_…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 gets400 invalid_request, and a team outside the key gets404 team_not_accessible, as does a request without it once the key reads no team at all.Idempotency-Keystring 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.
referencestring 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.
messagestring Required 1–4000 charsUser message for this real API-origin chat turn; it never proves a phone, transport identity or consent.
conversation_idstring ID prefixconv_…Optional retained API-origin conversation owned by this same integration and selected assistant. Omit to begin a new session.
Returns
Returns an Operation object.
objectstringAlways operation.
idstring ID prefixop_…Opaque durable operation id.
statusstringDurable operation state; outcome_unknown must be reconciled before repeating the effect.
Possible valuesqueuedrunningsucceededfailedcancelledoutcome_unknown
endpointstringThe original endpoint executed by this operation.
Possible valuestasks.createtasks.completenotifications.createdecision_requests.createdecision_requests.cancelbookings.createbookings.cancelbookings.reschedulebookingPayments.sendLinkmessages.sendmessages.requestInfomessages.prepareReplycalls.startlibrary.sendcatalog.sendquotes.recordOutcomeassistants.run
created_atstring Formatdate-timeWhen this operation was accepted, in UTC.
updated_atstring Formatdate-timeWhen its current state was recorded, in UTC.
resultTaskReceipt | NotificationReceipt | DecisionRequestReceipt | BookingReceipt | BookingPaymentReceipt | MessageReceipt | RequestedInfoReceipt | FirstReplyReceipt | CallStartReceipt | QuoteOutcomeReceipt | AssistantRunReceipt | LibraryDeliveryReceipt | CatalogSendReceipt NullableMinimal public resource receipt after success, otherwise null.
errorobject NullableSafe failure information, or null.
codestringClosed failure code without provider text, task content or credentials.
Possible valuesauthorization_failedconfiguration_missinginput_expiredinvalid_inputresource_missingexecution_failedoutcome_unknown
Errors
- 400
idempotency_key_requiredIdempotency key required - 400
team_requiredTeam required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 404
team_not_accessibleTeam not accessible - 409
idempotency_key_reusedIdempotency key reused - 409
idempotency_in_progressWrite in progress - 409
outcome_unknownWrite outcome unknown - 409
capture_not_readyTeam data is still being prepared - 429
quota_exceededDaily quota exceeded
# 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?"}'{
"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
}Metadata-only published assistant discovery; no prompts, tool configuration or provider selectors.
Attributes
objectstringAlways assistant_options.
dataArray<object> ≤ 50 itemsBounded current published selections. Draft and disabled assistants are omitted.
referencestring ≤ 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.
namestring 1–200 charsPublished assistant display name, without its private instructions.
versionintegerExact current published version. A later publication invalidates this selection.
completebooleanWhether this bounded discovery inspected every current assistant definition.
{
"object": "assistant_options",
"data": [
{
"reference": "tast1.dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
"name": "Example assistant",
"version": 1
}
],
"complete": true
}Content-free completed-run metadata. It never exports the reply, prompt, private source or provider identifiers.
Attributes
objectstringAlways assistant_run_receipt.
statusstringThe original canonical turn completed with an actual retained assistant reply, not merely queue admission.
conversation_idstring ID prefixconv_…Opaque current conversation. Read reply bodies through conversations.messages with its separate current content grant.
{
"object": "assistant_run_receipt",
"status": "completed",
"conversation_id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ"
}