Overview
A conversation is one thread with a lead, on one channel and business account: WhatsApp, email, the web chat (chatbot), Facebook, Instagram, SMS or TikTok. A lead can have several conversations on the same channel and business account, one for each contact address (phone number, email address or handle) it has used, so key your copy on the conversation's id. The list and detail endpoints return conversation metadata:
channel_type: the channel, ornullfor a channel this version of the API does not know.status:activeorarchivedin the team's inbox.assignee: the team member the conversation is assigned to, ornull.reply_mode:humanwhile a person has taken the conversation over, including a WhatsApp chat answered from the WhatsApp Business app, andaiotherwise.aimeans no takeover is active; it does not mean an assistant is set up or answering on that channel. A takeover with a time limit goes back toaiwhen it ends, and the conversation gets a new version then.last_inbound_atandlast_outbound_at: when the latest message came in from the customer, and when the latest message that did not fail went out to them. Erased messages, imported WhatsApp history and web-chat visitor messages do not count as inbound, so achatbotconversation readsnullthere. Imported WhatsApp history does count as outbound.
The contact's name, phone number or handle travel on the linked lead, not on the conversation. For the picture across all of a lead's channels, read the lead's response facet with GET /v1/leads/{id}.
Use GET /v1/conversations and GET /v1/conversations/{id} to look conversations up; GET /v1/conversations?lead= lists one lead's conversations. To keep a copy, follow the changes feed: Keep a copy in sync explains it.
Message content and delivery
POST /v1/conversations/messages reads a bounded page of the selected current conversation only with the separate message-content permission. A truncated page is not a complete export; attachment metadata does not grant attachment content.
Use POST /v1/messages/channels to discover current configured senders. POST /v1/messages/send accepts a current conversation or an owned lead and a returned sender reference. The destination is resolved from current records rather than a raw address supplied by the caller. Text, approved WhatsApp templates, calling invitations and reviewed Library selections retain their own channel and recipient checks. Explicit consent assertions never override opt-outs.
POST /v1/messages/requested-info admits the configured requested-information response; its receipt does not certify delivery. POST /v1/messages/prepare-reply prepares the canonical first response for the current conversation without claiming that it reached a provider. Observe asynchronous operations and reconcile uncertain outcomes before repeating an effect.
GET /
Returns a page of the team's conversations, one per channel, business account and contact address: channel, inbox status, assignee and the times of the latest inbound and outbound messages. Pass lead for one lead's conversations. Message content is never exported.
Query parameters
limitinteger Range 1–100 Default25Items per page, 1–100. Defaults to 25.
cursorstring 1–512 charsThe
next_cursorof the previous page. Omit it for the first page.leadstring ID prefixlead_…Only the conversations linked to this lead: every item's
leadis this id. A lead of another team, or one that does not exist, matches nothing.
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 a list of Conversation objects.
objectstringAlways
list.dataArray<Conversation>The items of this page.
has_morebooleantruewhen another page follows: fetch it withnext_cursor, even if this page holds fewer items thanlimit.next_cursorstring NullableOpaque cursor for the next page, or null on the last page. Never parse it.
Errors
- 400
team_requiredTeam required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
team_not_accessibleTeam not accessible - 409
capture_not_readyTeam data is still being prepared - 429
quota_exceededDaily quota exceeded
curl 'https://api.totemstudio.ai/v1/conversations?limit=25' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID"{
"object": "list",
"data": [
{
"id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
"object": "conversation",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"channel_type": "whatsapp",
"status": "active",
"assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
"reply_mode": "ai",
"created_at": "2026-09-28T10:16:00.000Z",
"last_inbound_at": "2026-10-01T08:58:00.000Z",
"last_outbound_at": "2026-10-01T08:59:30.000Z",
"version": 12,
"updated_at": "2026-10-01T08:59:31.040Z"
}
],
"has_more": false,
"next_cursor": null
}GET /
Returns one conversation by its id, without message content. A conversation this key cannot read, or one that was removed, answers 404 resource_missing.
Path parameters
idstring Required ID prefixconv_…The conversation's public id.
Returns
Returns a Conversation object.
idstring ID prefixconv_…Public id of the record.
objectstringAlways
conversation.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team this record belongs to.
leadstring Nullable ID prefixlead_…The lead this conversation is linked to, or null when it is unlinked or the lead no longer exists. Identity (name, phone, handle) travels on the lead only.
channel_typestring NullableThe channel:
whatsapp,email,chatbot(the web chat),facebook,instagram,smsortiktok; null for a value this version does not know. A lead can have several conversations on the same channel and business account, one for each contact address (phone number, email address or handle) it has used, so key your copy onid.Possible valuessmswhatsappfacebookinstagramtiktokchatbotemail
statusstring Nullableactiveorarchivedin the team's inbox; null for a value this version does not know.Possible valuesactivearchived
assigneestring Nullable ID prefixmem_…The team member assigned to the conversation (see
/members), or null.reply_modestringhumanwhile a person has taken the conversation over, including a WhatsApp chat answered from the WhatsApp Business app;aiotherwise.aimeans no takeover is active, not that an assistant is set up or answering on this channel. A timed takeover returns toaiwhen it expires, and the record's version changes then.Possible valuesaihuman
created_atstring Nullable Formatdate-timeWhen the conversation was created (UTC).
last_inbound_atstring Nullable Formatdate-timeThe latest customer message (UTC). Not counted: erased messages, imported WhatsApp history and web-chat visitor turns, so a
chatbotconversation reads null. Instagram shares cannot be told apart and count.last_outbound_atstring Nullable Formatdate-timeThe latest message sent to the customer that did not fail (UTC), whoever sent it. Imported WhatsApp history counts.
versioninteger Range ≥ 1Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.
updated_atstring Formatdate-timeWhen Totem recorded this version (UTC). It is not the time the business event happened.
Errors
- 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 409
capture_not_readyTeam data is still being prepared
curl 'https://api.totemstudio.ai/v1/conversations/conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ' \
-H "Authorization: Bearer $TOTEM_API_KEY"{
"id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
"object": "conversation",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"channel_type": "whatsapp",
"status": "active",
"assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
"reply_mode": "ai",
"created_at": "2026-09-28T10:16:00.000Z",
"last_inbound_at": "2026-10-01T08:58:00.000Z",
"last_outbound_at": "2026-10-01T08:59:30.000Z",
"version": 12,
"updated_at": "2026-10-01T08:59:31.040Z"
}POST /
Reads a bounded latest slice of retained message text under its separate explicit content grant; existing messages:read keys remain metadata-only. Hosted executions derive their exact current conversation, and any supplied opaque id must match it. Media locations, provider identifiers and erased messages are withheld, with explicit truncation.
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.
Request body
Read at most fifty latest retained messages of the exact conversation; hosted processing can derive its signed source.
conversation_idstring ID prefixconv_…Current conversation in the selected team. Tenant integrations must supply its identifier; hosted processing may derive its exact signed source.
limitinteger Range 1–50 Default20Maximum number of latest retained messages to return, from one to fifty.
Returns
Returns a ConversationMessages object.
objectstringIdentifies a content-authorized conversation message page.
Valueconversation_messages
messagesArray<object> ≤ 50 itemsLatest retained messages visible under the current content grant, with at most fifty entries.
referencestring Pattern^mmb1_[a-f0-9]{64}$Opaque reference bound to this retained message and conversation incarnation.
directionstringWhether the message was received from or sent to the contact.
Possible valuesinboundoutbound
atstring Formatdate-timeStored message timestamp in UTC.
content_typestringRetained message content type; attachments are indicated without exposing their locations.
Possible valuestextimageaudiovideofileunknown
textstring ≤ 8000 charsAuthorized retained message text, limited to eight thousand characters.
text_truncatedbooleanTrue when the retained text exceeds the returned text limit.
has_attachmentbooleanWhether the retained message has an attachment; this does not grant attachment access.
delivery_statusstring NullableObserved delivery status, or null when no such provider evidence is retained.
Possible valuesdeliveredreadfailed
importedbooleanTrue for a message retained through history import.
truncatedbooleanTrue when older retained messages may exist beyond this bounded page.
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/conversations/messages' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID" \
-H "Content-Type: application/json" \
--data '{"conversation_id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ", "limit": 25}'{
"object": "conversation_messages",
"messages": [],
"truncated": false
}POST /
Returns bounded opaque references to currently configured permitted sending channels. It exposes no provider account identifiers, destinations or message content; sending rechecks the current connection and recipient.
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 a MessageChannels object.
objectstringIdentifies a configured message sender inventory.
Valuemessage_channels
channelsArray<object> ≤ 100 itemsCurrent configured senders, limited to one hundred entries. References are scoped to this integration and team.
referencestring Pattern^mch1_[a-f0-9]{64}$Opaque reference to one current configured sender returned by messages.channels. A changed connection invalidates it.
channel_typestringMessaging channel served by this configured sender.
Possible valueswhatsappfacebookinstagramtiktokemailsmschatbot
namestring 1–300 charsConfigured sender display name.
Errors
- 400
team_requiredTeam required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 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/messages/channels' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID" \
-H "Content-Type: application/json" \
--data '{}'{
"object": "message_channels",
"channels": [
{
"reference": "mch1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_type": "chatbot",
"name": "Example chat"
}
]
}POST /
Queues staff-configured requested information for the current authorized lead. Current server configuration selects the WhatsApp or designed-email channel, sender and template; raw destinations and caller-selected templates are refused. The receipt confirms queue admission without claiming delivery; reuse Idempotency-Key after an uncertain acknowledgement.
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
Enqueue the current configured information response for the authorized contact through the canonical requested-information queue.
lead_idstring ID prefixlead_…Current retained lead; hosted processing may derive its exact signed source.
infostring Required 1–500 charsThe information requested by the contact, up to five hundred characters. The current staff configuration selects the sender and template.
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/messages/requested-info' \
-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 '{"lead_id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG", "info": "Requested the first-visit information."}'{
"object": "operation",
"id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
"status": "queued",
"endpoint": "messages.requestInfo",
"created_at": "2026-10-01T09:30:00.000Z",
"updated_at": "2026-10-01T09:30:00.000Z",
"result": null,
"error": null
}POST /
Processes the configured first-reply campaign for the exact saved inbound conversation, preserving lifetime deduplication, human control and newer-message fences. Tenant integrations provide an owned conversation while hosted execution derives its signed source; configured Library content may be sent or prepared for webchat. Read the completed receipt before continuing the assistant because 202 only accepts the intent; private source identifiers and provider URLs are withheld.
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
Prepare the configured canonical first reply for the current saved customer turn.
conversation_idstring ID prefixconv_…Current owned conversation. Required for tenant integrations; hosted execution derives its exact saved source.
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/messages/prepare-reply' \
-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 '{"conversation_id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ"}'{
"object": "operation",
"id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
"status": "queued",
"endpoint": "messages.prepareReply",
"created_at": "2026-10-01T09:30:00.000Z",
"updated_at": "2026-10-01T09:30:00.000Z",
"result": null,
"error": null
}POST /
Starts one durable send to a current owned conversation or canonical lead using a permitted configured sender. Current source, recipient, actor and channel rules are checked at the actual provider boundary. Prepared web chat responses are distinguished from provider acceptance; uncertain delivery must be reconciled before repeating it.
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
Start one durable message operation using current source and channel policy. A web chat response is prepared rather than provider-delivered.
targetobject RequiredChoose the current conversation or a current lead and configured sender; never supply a raw destination.
kindstring RequiredPossible valuesconversationlead
conversation_idstring ID prefixconv_…Current conversation in the selected team. Tenant integrations must supply its identifier; hosted processing may derive its exact signed source.
lead_idstring Conditional ID prefixlead_…Current canonical lead whose stored contact details determine the destination.
channel_referencestring Conditional Pattern^mch1_[a-f0-9]{64}$Opaque reference to one current configured sender returned by messages.channels. A changed connection invalidates it.
contentobject RequiredOne bounded text, approved WhatsApp template, calling invitation or current retained Library selection.
kindstring RequiredPossible valueswhatsapp_calltexttemplatelibrary
actionstring ConditionalPossible valuessend_call_buttonrequest_permission
body_textstring Conditional 1–1024 charsText displayed to the current WhatsApp recipient, up to one thousand twenty-four characters.
display_textstring 1–20 charsOptional button label, up to twenty characters.
ttl_minutesinteger Range 1–43200Optional button lifetime in minutes, from one to forty-three thousand two hundred.
textstring Conditional 1–20000 charsMessage text, with at most twenty thousand characters.
subjectstring ≤ 998 charsEmail subject; omitted replies reuse the current thread subject.
template_namestring Conditional 1–512 chars Pattern^[a-z0-9_]+$Exact name of a currently approved template on the configured WhatsApp account.
languagestring Conditional 2–20 chars Pattern^[a-z]{2,3}(?:_[A-Z]{2})?$Approved template language code, such as es or en_US.
parameter_formatstring DefaultPOSITIONALHow the approved template identifies its body variables.
Possible valuesNAMEDPOSITIONAL
variable_valuesArray<string> ≤ 100 itemsOrdered body values for a positional template.
variable_values_mapobjectNamed body values keyed by the approved template parameter names.
url_button_valuesobjectDynamic URL button values keyed by the approved button index.
consent_confirmedboolean ConditionalCaller attestation that the template send was confirmed; this does not manufacture customer consent.
Valuetrue
asset_referencestring Conditional 40–16384 chars Pattern^tcnt1\.[A-Za-z0-9_-]+$Current server-issued opaque content reference; never parse or modify it.
captionstring ≤ 2000 charsOptional caption for the current retained Library selection.
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/messages/send' \
-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 '{"target": {"kind":"conversation","conversation_id":"conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ"}, "content": {"kind":"text","text":"Here is the requested update."}}'{
"object": "operation",
"id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
"status": "queued",
"endpoint": "messages.send",
"created_at": "2026-10-01T09:30:00.000Z",
"updated_at": "2026-10-01T09:30:00.000Z",
"result": null,
"error": null
}A conversation on one channel: its status, assignee and the times of the latest messages, never their content.
Attributes
idstring ID prefixconv_…Public id of the record.
objectstringAlways
conversation.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team this record belongs to.
leadstring Nullable ID prefixlead_…The lead this conversation is linked to, or null when it is unlinked or the lead no longer exists. Identity (name, phone, handle) travels on the lead only.
channel_typestring NullableThe channel:
whatsapp,email,chatbot(the web chat),facebook,instagram,smsortiktok; null for a value this version does not know. A lead can have several conversations on the same channel and business account, one for each contact address (phone number, email address or handle) it has used, so key your copy onid.Possible valuessmswhatsappfacebookinstagramtiktokchatbotemail
statusstring Nullableactiveorarchivedin the team's inbox; null for a value this version does not know.Possible valuesactivearchived
assigneestring Nullable ID prefixmem_…The team member assigned to the conversation (see
/members), or null.reply_modestringhumanwhile a person has taken the conversation over, including a WhatsApp chat answered from the WhatsApp Business app;aiotherwise.aimeans no takeover is active, not that an assistant is set up or answering on this channel. A timed takeover returns toaiwhen it expires, and the record's version changes then.Possible valuesaihuman
created_atstring Nullable Formatdate-timeWhen the conversation was created (UTC).
last_inbound_atstring Nullable Formatdate-timeThe latest customer message (UTC). Not counted: erased messages, imported WhatsApp history and web-chat visitor turns, so a
chatbotconversation reads null. Instagram shares cannot be told apart and count.last_outbound_atstring Nullable Formatdate-timeThe latest message sent to the customer that did not fail (UTC), whoever sent it. Imported WhatsApp history counts.
versioninteger Range ≥ 1Increases every time one of the record's exported fields changes. Apply a change only when its version is greater than the one you hold.
updated_atstring Formatdate-timeWhen Totem recorded this version (UTC). It is not the time the business event happened.
{
"id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ",
"object": "conversation",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"channel_type": "whatsapp",
"status": "active",
"assignee": "mem_h548E7UiYhutHhucVrQCzkM0eaea0",
"reply_mode": "ai",
"created_at": "2026-09-28T10:16:00.000Z",
"last_inbound_at": "2026-10-01T08:58:00.000Z",
"last_outbound_at": "2026-10-01T08:59:30.000Z",
"version": 12,
"updated_at": "2026-10-01T08:59:31.040Z"
}Bounded current message bodies without sender destinations, raw identifiers or media locations. Truncated means older retained rows may exist.
Attributes
objectstringIdentifies a content-authorized conversation message page.
Valueconversation_messages
messagesArray<object> ≤ 50 itemsLatest retained messages visible under the current content grant, with at most fifty entries.
referencestring Pattern^mmb1_[a-f0-9]{64}$Opaque reference bound to this retained message and conversation incarnation.
directionstringWhether the message was received from or sent to the contact.
Possible valuesinboundoutbound
atstring Formatdate-timeStored message timestamp in UTC.
content_typestringRetained message content type; attachments are indicated without exposing their locations.
Possible valuestextimageaudiovideofileunknown
textstring ≤ 8000 charsAuthorized retained message text, limited to eight thousand characters.
text_truncatedbooleanTrue when the retained text exceeds the returned text limit.
has_attachmentbooleanWhether the retained message has an attachment; this does not grant attachment access.
delivery_statusstring NullableObserved delivery status, or null when no such provider evidence is retained.
Possible valuesdeliveredreadfailed
importedbooleanTrue for a message retained through history import.
truncatedbooleanTrue when older retained messages may exist beyond this bounded page.
{
"object": "conversation_messages",
"messages": [],
"truncated": false
}Configured sender references without provider identifiers or credentials.
Attributes
objectstringIdentifies a configured message sender inventory.
Valuemessage_channels
channelsArray<object> ≤ 100 itemsCurrent configured senders, limited to one hundred entries. References are scoped to this integration and team.
referencestring Pattern^mch1_[a-f0-9]{64}$Opaque reference to one current configured sender returned by messages.channels. A changed connection invalidates it.
channel_typestringMessaging channel served by this configured sender.
Possible valueswhatsappfacebookinstagramtiktokemailsmschatbot
namestring 1–300 charsConfigured sender display name.
{
"object": "message_channels",
"channels": [
{
"reference": "mch1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_type": "chatbot",
"name": "Example chat"
}
]
}Current-source message result without body, destination or provider identifiers.
Attributes
objectstringIdentifies a retained message delivery result.
Valuemessage_receipt
statusstringSent requires actual provider acceptance; prepared identifies a retained web chat response awaiting its delivery surface.
Possible valuessentprepared
conversation_idstring ID prefixconv_…Current conversation in the selected team. Tenant integrations must supply its identifier; hosted processing may derive its exact signed source.
{
"object": "message_receipt",
"status": "prepared",
"conversation_id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ"
}Source-proven canonical first-reply receipt with bounded context and no provider identifiers.
Attributes
objectstringAlways first_reply_receipt.
first_replyobject NullableCurrent source-proven context, or null when no content may be disclosed.
capabilitystringAlways first_reply_v1.
statusstring 1–40 charsActual campaign delivery, preparation or suppression status.
reasonstring May be absent ≤ 100 charsCanonical bounded explanation when available.
languagestring May be absent ≤ 10 charsLanguage selected by the canonical first-reply policy.
sent_contentArray<string> ≤ 20 itemsAuthorized bounded text from the canonical campaign receipt.
prepared_contentArray<string> May be absent ≤ 20 itemsAuthorized bounded text prepared for the visitor when present.
last_delivered_questionstring May be absent ≤ 1000 charsLast delivered question when the canonical campaign recorded one.
skip_ai_replybooleanWhether the canonical campaign or human ownership suppresses the normal assistant reply.
prepared_referencestring Nullable 40–16384 chars Pattern^tcnt1\.[A-Za-z0-9_-]+$Opaque prepared webchat content reference, or null. Resolve it with the same current content permissions.
{
"object": "first_reply_receipt",
"first_reply": null,
"skip_ai_reply": false,
"prepared_reference": null
}Immutable queue admission acknowledgement, without content, destination or provider identifiers.
Attributes
objectstringAlways requested_info_receipt.
statusstringWhether this admission created the queued request or found an existing request in progress. This is an admission snapshot.
Possible valuesqueuedalready_queued
channelstringConfigured response channel chosen by current staff policy.
Possible valueswhatsappemail
delivery_confirmedbooleanThis queue acknowledgement does not attest delivery, including when read again after dispatch.
Valuefalse
includes_requested_detailbooleanWhether the configured response includes the requested information field.
eta_minutesnumberThe canonical queue estimate at admission, in minutes; not a delivery guarantee.
Value5
{
"object": "requested_info_receipt",
"status": "queued",
"channel": "email",
"delivery_confirmed": false,
"includes_requested_detail": true,
"eta_minutes": 5
}