Overview
A lead is a person or company in a team's pipeline: their contact details, where they stand (board and stage), their status and their contact_permissions. A record with record_kind: "client" is a client rather than a lead: it has no pipeline status, so its status is null. Leads and clients come from the same endpoints.
The eight statuses are new, contacted, qualified, negotiating, converted, lost, archived and unreachable. converted does not mean "won". A lead whose status this version of the API does not know keeps record_kind: "lead" and reads status: null. An archived lead says why in archive_reason, including merged and family_transfer for the leads that merges and transfers leave behind.
Apply contact_permissions before any of your systems contacts the person: Keep a copy in sync explains each one.
Date of birth
date_of_birth is the lead's saved date of birth as a YYYY-MM-DD string, or null when no usable date is recorded. It is a calendar date, for example 1988-02-29, with no time or time zone. Keep it as a date rather than converting it to a timestamp. The same field is part of the Lead objects returned by lists, detail, search and the changes feed.
With crm:write, conditional PATCH can set date_of_birth to a valid calendar date or clear it with null. The API does not enable birthday greetings or configure their schedule. Birthday automation settings, internal lookup fields and pending delivery state are not exported. A saved birthday does not grant permission to contact the person; continue to apply contact_permissions.
Attribution and response
GET /v1/leads/{id} returns the lead with two facets: attribution, where it came from, and response, how the team has answered it across its conversations and calls. Each facet has its own version, so a new message changes the lead's response without changing the lead. A facet is null while Totem is still preparing it. Lists return the lead alone. The changes feed delivers the facets as items of their own, lead_attribution and lead_response, with the lead's id. Data coverage explains what each facet can and cannot tell you.
Search by phone or email
POST /v1/leads/search finds a team's leads by exact phone or email. Send exactly one of phone or email in the JSON body, never in a URL:
curl https://api.totemstudio.ai/v1/leads/search \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID" \
-H "Content-Type: application/json" \
-d '{"email": "alex.rivera@example.com"}'Matching is exact on the number as Totem stores it, not on the normalized phone a lead shows. A phone matches a record stored in E.164, with or without its leading +; a record stored with spaces or without its country prefix is not found, even by the phone the API returns for it. An email matches the address as you sent it or in lower case. Records Totem has not delivered to the API yet are skipped until it does. Search returns archived, merged and client records too; follow merged_into to the lead that was kept. It returns at most 10 leads, in one response that never pages, so when many records share a phone number or an email address, it may not return them all.
Activities
GET /v1/leads/{id}/activities returns a lead's history, a page at a time: each change of its stage, status or assigned members, and when it happened. actor_kind says who made it: a person (human), the AI (ai), Totem automation (system), an API caller (api), or unknown. Totem knows who made a change only when the same save wrote the lead's status, so a stage or assignee change made on its own reads unknown. Pages are not in date order, so sort by occurred_at. Activities never change once written, but they are removed together with their lead, and new ones also arrive in the changes feed.
Boards and stages
A board is a pipeline, with its stages in order. A lead's stage names the step it is on. Each stage has a mode that says who moves leads: people only (standard), people and the AI, which may move leads in (supervised), or the AI, which runs outreach and moves leads in and out (automated).
GET /v1/boards returns a team's boards with their stages, a page at a time. Boards also travel in the changes feed; read this list when a lead names a stage you have not seen yet. A stage with no stored position is left out of its board, so do not re-read the list for a stage it did not include last time.
CRM writes and note contents
The reference below includes conditional CRM mutations, current operational context, requested contacts, configured office handoffs, referrals and separately granted note content. Start with CRM writes and notes for import versus inbound, fill-missing upsert, ETags, 48-hour retries and note tombstones. website is stored contact data; Totem does not fetch it.
Operational CRM actions
POST /v1/crm/context returns current source-backed context under its explicit operational permission. Optional notes, custom values, messages, calls and payments each require their own current content grant; missing content is reported through coverage instead of fabricated. A source ETag is distinct from an inventory version.
POST /v1/crm/scheduled-contact records a customer-requested future contact within its allowed window, using the reviewed current source validator. POST /v1/crm/handoff routes through a currently configured office of the organization; it does not accept arbitrary destination teams. POST /v1/referrals/totem records a consented referral to the fixed Totem destination without disclosing whether a destination contact already exists.
POST /v1/crm/quote-outcomes records externally attested calculator and delivery facts through the configured commercial policy. Totem does not independently certify those external facts. Each action requires its explicitly selected capability; a general CRM permission or key rotation does not silently grant all of them.
GET /
Returns a page of the team's leads and clients, in a stable order that carries no meaning. Filter by at most one of board, stage or status; a board or stage the team does not have returns an empty page. To keep a copy up to date, follow the changes feed instead of re-reading this list.
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.boardstring ID prefixbrd_…Only leads on this board. At most one of
board,stageandstatus.stagestring ID prefixstg_…Only leads in this stage. At most one of
board,stageandstatus.statusstringOnly leads with this status. At most one of
board,stageandstatus.Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
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 Lead objects.
objectstringAlways
list.dataArray<Lead>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/leads?limit=25' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID"{
"object": "list",
"data": [
{
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z"
}
],
"has_more": true,
"next_cursor": "eyJ2IjoxLCJrIjoibGVhZCIsImEiOiJsZWFkX3I3MkVmYlJOVXp1cU9SRkpSME84SHhBd0VYZDkzakdVVFlNYU1NWEtTRjBRYkxTOENpVUtKcEVQMzRMRlFHIiwicyI6ImYzNTI3NzI2MTkwYiJ93iHyRg"
}POST /
Creates a lead with supplied CRM fields (201) or fills only missing contact details on an existing identity (200), appending an optional note in the same idempotent transaction; changing an existing pipeline value requires conditional PATCH or returns 400 invalid_request. Import never revives or arms outreach; inbound requires its separate capability and a phone supplied by the person, with destination, consent and durable outreach guards. A validate_only dry run returns 200 without writes, conflicting identities return 409 ambiguous_identity, and external ids never cross integration namespaces.
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
Strict CRM intake body. An external id alone must already resolve in this integration’s namespace; conflicting phone/email identities are never silently merged.
originstring RequiredRequired contact contract: import never arms outreach; inbound requires an explicitly enabled principal and a phone supplied by the person.
Possible valuesimportinbound
response_viewstringRequest a source-backed metadata receipt rather than an export capture version; operational source authorization still applies.
phonestring Pattern^\+[1-9][0-9]{6,14}$Phone supplied by the person in E.164 format.
emailstring Formatemail≤ 254 chars Pattern^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Contact email address.
namestring 1–200 charsFirst name or display name.
surnamestring 1–200 charsSurname.
companystring 1–300 charsCompany name.
websitestring Formaturi≤ 2048 charsContact website; it is stored without fetching it.
boardstring ID prefixbrd_…Destination board belonging to the selected team.
stagestring ID prefixstg_…Destination stage belonging to the selected board and team; a move never bypasses outreach guards.
tagsArray<string> ≤ 50 itemsBusiness tags, replacing the editable set; system tags cannot be set or removed.
prioritystringLead priority.
Possible valueslowmediumhighurgent
estimated_valuenumber Range 0–1000000000000Estimated value in major units, without an implied currency.
assigneesArray<string> ID prefixmem_…≤ 100 itemsAssigned team members, replacing the previous editable set.
external_idstring 1–200 charsYour integration’s external id, scoped to this principal and team; never another integration’s namespace.
validate_onlybooleanValidate without creating, updating or contacting anyone; the response is a lead_validation object.
consentobjectExplicit consent evidence; omitted consent is never treated as granted and import does not record it.
whatsappobjectAuditable WhatsApp consent evidence, attributed to the integration.
grantedboolean RequiredThe person’s explicit WhatsApp choice; inbound origin alone never grants consent.
captured_atstring Required Formatdate-timeWhen the person made this choice.
methodstring Required 1–100 charsHow this explicit consent was collected.
notice_refstring Required 1–500 charsReference to the notice shown when collecting this choice.
notestring ≤ 5000 charsOptional qualification note appended atomically to a created or authorized existing lead. Blank text writes no note; replaying the same Idempotency-Key does not append again. Reading note content still requires its separate grant.
intakeobjectOptional route for external inbound submissions only. Reuse the original submission ID as the Idempotency-Key across retries (up to 191 characters). Hosted assistant requests cannot select intake routes.
route_idstring Required Pattern^[a-z0-9][a-z0-9_-]{1,63}$Exact configured intake route in the authorized workspace.
notify_teambooleanQueue one internal team notification with the submission. Requires notifications:write.
initial_custom_valuesArray<object> 1–50 itemsInitial exact-name values set only when this request creates a new lead; existing or revived leads ignore them. Requires current crm:custom_values:write in addition to crm:write; hosted assistant/source requests cannot supply this field. Provenance is server-owned; editing existing values still requires the independent custom-values If-Match.
namestring Required 1–100 charsExact stable field name; names are never inferred from labels.
labelstring Required ≤ 200 charsHuman-readable label.
valuestring Required ≤ 2000 charsExact string value; an empty string is a stored value, not deletion.
Returns
Returns a LeadUpsertResult object.
objectstringAlways lead_validation.
Possible valueslead_mutationlead_source_mutationlead_validation
createdboolean ConditionalTrue only when this call created a new lead. True only when this operation created the retained lead.
Current authorized source receipt, or null when an unverified duplicate must remain unlinked.
intake_notificationstring May be absentStatus of the team notification requested for this submission. Queueing does not confirm push delivery.
Possible valuesqueuedalready_queued
outreachobject May be absentIntake outreach disposition, present on upsert responses.
statusstringnot_armed for imports; withheld when a guard blocks intake outreach; eligible means queued under the team’s ordinary intake rules, never a delivery promise.
Possible valuesnot_armedwithheldeligible
reasonstring Nullable ≤ 200 charsClosed guard reason when withheld, otherwise null.
changedboolean ConditionalWhether the source values changed; an inert repeat is false.
registered_lead_linkedboolean May be absentFor voice registration, whether the genuinely created contact was linked to this execution. A different stated contact stays held and grants no subsequent source access.
validboolean ConditionalThe request passed validation; no mutation or outreach was performed.
Valuetrue
Errors
- 400
idempotency_key_requiredIdempotency key required - 400
team_requiredTeam required - 403
inbound_not_enabledInbound intake not enabled - 403
consent_requiredConsent required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
team_not_accessibleTeam not accessible - 409
idempotency_key_reusedIdempotency key reused - 409
idempotency_in_progressWrite in progress - 409
outcome_unknownWrite outcome unknown - 409
ambiguous_identityAmbiguous lead identity - 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/leads' \
-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 '{"origin": "import", "email": "alex.rivera@example.com", "name": "Alex"}'{
"object": "lead_mutation",
"created": true,
"lead": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z"
},
"outreach": {
"status": "not_armed",
"reason": null
}
}GET /
Returns one lead with its two facets: attribution (where it came from) and response (how the team has answered it), each with its own version. A lead created moments ago can answer 404 resource_missing until Totem has prepared it; the changes feed delivers it then.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Returns
Returns a LeadDetail object.
idstring ID prefixlead_…Public id of the record.
objectstringAlways
lead.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team the record belongs to.
record_kindstringleadwhen the record has a pipeline status, otherwiseclient. A lead whose status this version does not know readsstatus: null.Possible valuesleadclient
namestring NullableFirst name or display name, or null.
surnamestring NullableSurname, or null.
date_of_birthstring Nullable FormatdatePattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Civil date of birth in YYYY-MM-DD, without a time or timezone; null when missing, cleared or invalid.
emailstring NullableEmail address as stored, or null.
companystring NullableCompany, or null.
websitestring NullableContact website as stored, without fetching it, or null.
phonestring NullablePhone in E.164, only when the stored number validates; otherwise null.
phone_statusstringvalid(seephone),invalid(a number is stored but does not validate, for example one stored without its country prefix) ormissing.Possible valuesvalidinvalidmissing
statusstring NullablePipeline status; null for a client record, or for a status this version does not know.
convertedis not "won".Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
status_set_bystring NullableWho set the current status: a person, the AI, Totem automation, an API caller, or unknown (no recorded transition lands on it). Null when
statusis null.Possible valueshumanaisystemapiunknown
archive_reasonstring NullableWhy the record was archived, as a closed code; stored free text is
other. Null when none is stored.Possible valuesopt_outno_consentnot_interestednot_qualifiedno_contactmergedfamily_transferother
archived_from_statusstring NullableThe status the lead had before its current archive; null while it is not archived or when unknown.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
contact_permissionsobjectContact permissions. Apply them before any outreach from your own systems.
do_not_contactbooleanTrue when the person asked never to be contacted (the
opt_outarchive reason). Stop every channel.email_opt_outbooleanTrue when the person unsubscribed from marketing and follow-up email.
email_opt_out_atstring Nullable Formatdate-timeWhen the email opt-out was recorded, or null.
whatsapp_consentboolean NullableWhatsApp consent: false when refused, true when recorded, null when unknown.
provenanceobjectThe source of each permission.
do_not_contactstring NullableWhere
do_not_contactcomes from, or null when it is false.Possible valuesarchive_reason
email_opt_outstring NullableWho recorded the email opt-out: the unsubscribe link, a person in Totem, or unknown. Null when there is none.
Possible valuesunsubscribe_linkmanualunknown
whatsapp_consentstring Nullablearchive_reasonwhen a refusal is recorded as the archive reason;storedfor the value kept on the record, which team members can edit. Null when unknown.Possible valuesstoredarchive_reason
merged_intostring Nullable ID prefixlead_…The lead this record was merged into, or null (also when that lead no longer exists).
transferred_toobject NullableWhere a transfer to another team of your organization sent this lead, or null. The team may be one your key does not read.
teamstring ID prefixteam_…The destination team.
leadstring Nullable ID prefixlead_…The destination lead, or null when its id cannot be named across teams: an assistant handoff created it, or the transfer landed on an existing lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.
revived_atstring Nullable Formatdate-timeWhen the contact last came back on their own and revived an archived lead, or null.
pipeline_clearedbooleanTrue when the lead was converted with "clear pipeline data": board, stage, priority, assignees, estimated value and the source fields other than
source_channelare null because they were cleared.converted_atstring Nullable Formatdate-timeWhen the lead was converted, while its status is
converted; otherwise null.value_at_conversionnumber NullableThe estimated value when it was converted, in major units. Survives "clear pipeline data".
prioritystring NullablePriority, or null.
Possible valueslowmediumhighurgent
tagsArray<string>Labels as stored.
leadandbookingare system labels.boardstring Nullable ID prefixbrd_…The board, resolved through the stage when it has one; or null.
stagestring Nullable ID prefixstg_…The stage, or null.
assigneesArray<string> Nullable ID prefixmem_…Assigned members, sorted. Null when the record has no pipeline data.
estimated_valuenumber NullableEstimated value in major units as stored (decimals allowed), or null.
estimated_value_currencynull NullableAlways null: Totem stores no currency with the value.
sourcestring NullableThe stored lead source;
apialso covers leads created by Totem itself (for example from a conversation or a call), seesource_detail. Null when none is stored.Possible valuesmeta_lead_adsmanualwebsite_formbooking_pagecsv_importapichatbotgoogle_adslinkedinother
source_channelstring NullableThe channel the record started on (for example
whatsapp,phone,widget), or null. Team members can edit it.source_detailstring Nullableconversation,call,external:<provider>,gated_ad:<source>,family_handoff,api_intakeorunknown; null whensourceneeds no detail.source_provenancestring Nullableserver_writtenwhen Totem set the source from what the ad platform reported; otherwisemember_editable(team members can change it). Null withsource.Possible valuesserver_writtenmember_editable
created_atstring Formatdate-timeWhen the record was created.
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.
The lead's attribution facet, or null while Totem is still preparing it.
The lead's response facet, or null while Totem is still preparing it.
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/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG' \
-H "Authorization: Bearer $TOTEM_API_KEY"{
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z",
"attribution": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_attribution",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"original_capture": {
"capture": "at_creation",
"captured_at": "2026-09-28T10:15:00.000Z",
"source": "meta_lead_ads",
"source_hint": null,
"source_channel": null,
"external_provider": null,
"received_at": "2026-09-28T10:15:00.000Z",
"submitted_at": "2026-09-28T10:14:30.000Z",
"origin": null,
"campaign": {
"id": {
"value": "120210000000000101",
"provenance": "provider"
},
"name": {
"value": "Spring check-up",
"provenance": "provider"
}
},
"ad": {
"id": {
"value": "120210000000000303",
"provenance": "provider"
},
"name": {
"value": "Free first visit",
"provenance": "provider"
}
},
"ad_set": {
"id": {
"value": "120210000000000202",
"provenance": "provider"
},
"name": {
"value": "Families nearby",
"provenance": "provider"
}
},
"ad_group": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"form": {
"id": {
"value": "900000000000000404",
"provenance": "provider"
},
"name": {
"value": "Book a check-up",
"provenance": "provider"
}
},
"creative": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"asset_group": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"page": {
"id": {
"value": "100000000000000505",
"provenance": "provider"
},
"name": {
"value": "Example Dental",
"provenance": "provider"
}
},
"utm": null,
"click_network": {
"value": null,
"provenance": "not_captured"
},
"ad_referral": null,
"family_origin": null,
"audience": {
"value": null,
"missing_reason": "unsupported"
}
},
"original_capture_missing_reason": null,
"latest_submission": null,
"latest_submission_missing_reason": "not_captured",
"version": 1,
"updated_at": "2026-09-28T10:15:02.100Z"
},
"response": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_response",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"last_inbound_at": "2026-10-01T08:58:00.000Z",
"last_outbound_at": "2026-10-01T08:59:30.000Z",
"awaiting_reply": false,
"last_answered_call_at": "2026-09-28T10:17:00.000Z",
"last_whatsapp_delivery_status": "read",
"coverage": {
"conversations": 2,
"calls": 1,
"channels_without_delivery_data": [
"email"
],
"truncated": false
},
"version": 7,
"updated_at": "2026-10-01T08:59:31.040Z"
}
}PATCH /
Updates only the declared CRM fields using the strong ETag from the current lead in If-Match; a stale version returns 412 version_conflict. Omitted fields remain unchanged, opt-outs can only be added, contact changes never arm outreach and an empty diff writes nothing. System, assistant, automation and billing fields are refused.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Headers
Idempotency-Keystring 1–255 chars Pattern^[\x21-\x7e]+$One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.
If-Matchstring Required 1–300 chars Pattern^"(?:lrs1_[a-f0-9]{64}|lead_[A-Za-z0-9]+:[1-9][0-9]{0,15})"$The current strong resource ETag, including its quotes; weak tags, wildcards, lists and another resource’s validator are refused.
Request body
Allowlisted CRM patch. Omitted fields are unchanged; contact changes remain inert and never arm outreach.
phonestring Nullable Pattern^\+[1-9][0-9]{6,14}$E.164 contact phone, or null to clear it without arming outreach.
emailstring Nullable Formatemail≤ 254 chars Pattern^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Contact email address, or null to clear it without arming outreach.
namestring 1–200 charsFirst name or display name.
surnamestring Nullable 1–200 charsSurname, or null to clear it. Omission preserves the current value.
companystring Nullable 1–300 charsCompany name, or null to clear it.
websitestring Nullable Formaturi≤ 2048 charsContact website, or null to clear it; it is never fetched.
boardstring ID prefixbrd_…Destination board belonging to the selected team.
stagestring ID prefixstg_…Destination stage belonging to the selected board and team; a move never bypasses outreach guards.
tagsArray<string> ≤ 50 itemsBusiness tags, replacing the editable set; system tags cannot be set or removed.
prioritystringLead priority.
Possible valueslowmediumhighurgent
estimated_valuenumber Nullable Range 0–1000000000000Estimated value in major units, or null to remove the optional value; omission preserves it.
assigneesArray<string> ID prefixmem_…≤ 100 itemsAssigned team members, replacing the previous editable set.
statusstringCurrent pipeline status. A transition into archived, converted or lost requires its dedicated action; an existing terminal status may be restated. An opted-out archived lead cannot be revived automatically. Cannot be combined with board/stage.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
follow_up_preferencestringThe person’s explicit automated follow-up choice. Omission preserves it. ai never clears global opt-outs, human ownership, pauses, incidents or manual callbacks.
Possible valuesaihumannone
date_of_birthstring Nullable FormatdatePattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Civil birth date, or null to clear it.
external_idstring 1–200 charsYour integration’s external id, scoped to this principal and team; never another integration’s namespace.
do_not_contactbooleanRecord an opt-out on every channel; the API cannot clear one.
Valuetrue
email_opt_outbooleanRecord an email opt-out; the API cannot clear one.
Valuetrue
Returns
Returns a LeadMutation object.
objectstringPossible valueslead_mutationlead_source_mutation
createdbooleanTrue only when this call created a new lead. True only when this operation created the retained lead.
Current authorized source receipt, or null when an unverified duplicate must remain unlinked.
intake_notificationstring May be absentStatus of the team notification requested for this submission. Queueing does not confirm push delivery.
Possible valuesqueuedalready_queued
outreachobject May be absentIntake outreach disposition, present on upsert responses.
statusstringnot_armed for imports; withheld when a guard blocks intake outreach; eligible means queued under the team’s ordinary intake rules, never a delivery promise.
Possible valuesnot_armedwithheldeligible
reasonstring Nullable ≤ 200 charsClosed guard reason when withheld, otherwise null.
changedboolean ConditionalWhether the source values changed; an inert repeat is false.
registered_lead_linkedboolean May be absentFor voice registration, whether the genuinely created contact was linked to this execution. A different stated contact stays held and grants no subsequent source access.
Errors
- 400
idempotency_key_requiredIdempotency key required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 409
idempotency_key_reusedIdempotency key reused - 409
idempotency_in_progressWrite in progress - 409
outcome_unknownWrite outcome unknown - 409
ambiguous_identityAmbiguous lead identity - 409
capture_not_readyTeam data is still being prepared - 412
version_conflictLead version conflict - 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 PATCH 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
-H "If-Match: ${TOTEM_IF_MATCH:?Set the current quoted resource ETag}" \
-H "Content-Type: application/json" \
--data '{"company": "Example Company"}'{
"object": "lead_mutation",
"created": true,
"lead": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z"
},
"outreach": {
"status": "not_armed",
"reason": null
}
}POST /
Finds the team's leads whose phone or email matches exactly, including archived, merged and client records (follow merged_into to the lead that was kept). Send exactly one of phone or email in the JSON body, never in the URL. Returns at most 10 leads, chosen from the first 20 records that match, in one response that never paginates.
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
Exactly one of phone or email, in the JSON body and never in the URL.
phonestring Conditional 3–40 charsA phone number in E.164 (
+12025550123). It finds the number stored in E.164, with or without the+, and in the layouts phone libraries write:+1 202-555-0123,(202) 555-0123and2025550123. Other layouts, such as202 555 0123, are not found.emailstring Conditional 3–254 charsAn email address. It finds records stored exactly as sent, or stored in lowercase.
Returns
Returns a list of Lead objects.
objectstringAlways
list.The matching leads: at most 10.
has_morebooleanAlways
false, even when more records match: search returns at most 10 leads and has no next page.next_cursornull NullableAlways
null: search does not paginate.
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/leads/search' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID" \
-H "Content-Type: application/json" \
--data '{"phone": "+12025550123"}'{
"object": "list",
"data": [
{
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z"
}
],
"has_more": false,
"next_cursor": null
}GET /
Returns a page of the lead's activities: each change of its stage, status or assigned members, with when it happened and, when Totem recorded it, who made it. Pages are not in date order, so sort by occurred_at. Activities never change once written, and new ones also arrive in the changes feed.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
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.
Returns
Returns a list of Activity objects.
objectstringAlways
list.dataArray<Activity>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
- 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 409
capture_not_readyTeam data is still being prepared - 429
quota_exceededDaily quota exceeded
curl 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/activities?limit=25' \
-H "Authorization: Bearer $TOTEM_API_KEY"{
"object": "list",
"data": [
{
"id": "act_aBgzeetVKDEjpAAkXfEFF53ZGd2ZMmGhUDKgagqLbh6c7R1GqOl0xsFw7pyRhD3SqqYWGMdb371xxj",
"object": "activity",
"livemode": false,
"type": "stage_changed",
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"occurred_at": "2026-09-28T10:20:00.000Z",
"actor_kind": "ai",
"stage_snapshot": {
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"name": "Contacted"
},
"value_snapshot": 1200,
"from": {
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
},
"to": {
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
},
"version": 1,
"updated_at": "2026-09-28T10:20:01.500Z"
}
],
"has_more": false,
"next_cursor": null
}GET /
Returns a cursor-paged list of this lead’s notes only when this principal has the separate explicit note-content grant and crm:notes:read scope. Existing read-only keys never gain note content automatically, and sector restrictions still apply. Cursors are bound to this principal, team and lead incarnation.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Query parameters
limitinteger Range 1–100 Default25Items per page, 1–100. Defaults to 25.
cursorstring 1–512 charsOpaque note-page cursor bound to the current lead.
viewstringSelect the unversioned current source representation.
Returns
Returns a LeadNoteList object.
objectstringAlways
list.dataArray<object> | Array<LeadNoteSource>The items of this page.
idstring ID prefixnote_…≤ 256 charsOpaque stable note id, bound to this team and lead incarnation; never parse it.
objectstringAlways lead_note.
livemodebooleanTrue for real data; false only in fictional example data.
leadstring ID prefixlead_…The lead this note belongs to.
versioninteger Range ≥ 1The current note version; use the matching strong note ETag for conditional writes.
created_atstring Formatdate-timeWhen the note was created.
updated_atstring Formatdate-timeWhen the current version was recorded.
external_idstring Nullable ≤ 200 charsYour integration’s external id for this note, or null; other integrations’ ids are withheld.
bodystring ≤ 50000 charsExisting note content, including empty attachment-only notes; available only with the explicit note-content grant. API writes accept 1–20,000 characters.
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
- 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 409
capture_not_readyTeam data is still being prepared - 429
quota_exceededDaily quota exceeded
curl 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/notes?limit=25' \
-H "Authorization: Bearer $TOTEM_API_KEY"{
"object": "list",
"data": [
{
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"object": "lead_note",
"livemode": false,
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"body": "Requested an updated proposal for the appointment.",
"created_at": "2026-10-01T09:30:00.000Z",
"external_id": "crm-note-123",
"version": 1,
"updated_at": "2026-10-01T09:30:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}POST /
Appends one integration-authored plain-text note and returns only its metadata, never note content. An external id is scoped to this integration and lead, and Idempotency-Key safely replays the same logical request. Reading any note body requires the separate explicit note-content grant.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Headers
Idempotency-Keystring 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
Append one integration-authored note. An external id deduplicates within this integration and lead.
bodystring Required 1–20000 charsPlain-text note body; stored with the integration as its author.
external_idstring 1–200 charsYour integration’s external id, scoped to this principal and team; never another integration’s namespace.
response_viewstringReturn metadata for the current source without an inventory capture version.
Returns
Returns a LeadNoteReceipt object.
objectstringPossible valueslead_note_receiptlead_note_source_mutation
Live source metadata or the deleted note identity, never content.
createdboolean ConditionalWhether this logical operation created the note.
deletedboolean ConditionalWhether this operation deleted its reviewed note incarnation.
Errors
- 400
idempotency_key_requiredIdempotency key required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 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/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/notes' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
-H "Content-Type: application/json" \
--data '{"body": "Requested an updated proposal.", "external_id": "crm-note-123"}'{
"object": "lead_note_receipt",
"note": {
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"object": "lead_note",
"livemode": false,
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"created_at": "2026-10-01T09:30:00.000Z",
"external_id": "crm-note-123",
"version": 1,
"updated_at": "2026-10-01T09:30:00.000Z"
}
}POST /
Archives the lead with a closed business reason using its current strong ETag in If-Match; stale versions return 412 version_conflict. The destructive-change budget applies and an opt_out reason suppresses every contact channel. This route cannot merge, transfer or erase a lead.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Headers
Idempotency-Keystring 1–255 chars Pattern^[\x21-\x7e]+$One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.
If-Matchstring Required 1–300 chars Pattern^"(?:lrs1_[a-f0-9]{64}|lead_[A-Za-z0-9]+:[1-9][0-9]{0,15})"$The current strong resource ETag, including its quotes; weak tags, wildcards, lists and another resource’s validator are refused.
Request body
Archive this lead with a closed business reason; never delete its data.
reasonstring RequiredPublic archive reason; merging and transfers within an organization are separate privileged operations.
Possible valuesopt_outno_consentnot_interestednot_qualifiedno_contactother
detailstring 1–2000 charsOptional explanation of the archive reason.
Returns
Returns a LeadMutation object.
objectstringPossible valueslead_mutationlead_source_mutation
createdbooleanTrue only when this call created a new lead. True only when this operation created the retained lead.
Current authorized source receipt, or null when an unverified duplicate must remain unlinked.
intake_notificationstring May be absentStatus of the team notification requested for this submission. Queueing does not confirm push delivery.
Possible valuesqueuedalready_queued
outreachobject May be absentIntake outreach disposition, present on upsert responses.
statusstringnot_armed for imports; withheld when a guard blocks intake outreach; eligible means queued under the team’s ordinary intake rules, never a delivery promise.
Possible valuesnot_armedwithheldeligible
reasonstring Nullable ≤ 200 charsClosed guard reason when withheld, otherwise null.
changedboolean ConditionalWhether the source values changed; an inert repeat is false.
registered_lead_linkedboolean May be absentFor voice registration, whether the genuinely created contact was linked to this execution. A different stated contact stays held and grants no subsequent source access.
Errors
- 400
idempotency_key_requiredIdempotency key required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 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 - 412
version_conflictLead version conflict - 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/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/archive' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
-H "If-Match: ${TOTEM_IF_MATCH:?Set the current quoted resource ETag}" \
-H "Content-Type: application/json" \
--data '{"reason": "not_interested"}'{
"object": "lead_mutation",
"created": true,
"lead": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z"
},
"outreach": {
"status": "not_armed",
"reason": null
}
}GET /
Requires the independent current custom-value content grant; exact names identify fields and current customFields override legacy formFields. Returns its own strong ETag, bound to the complete current snapshot and lead incarnation. Merged, erased and ambiguous duplicate-name sources are refused.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Query parameters
viewstringSelect the unversioned current source representation.
Returns
Returns a LeadCustomValues object.
objectstringAlways lead_custom_values.
leadstring ID prefixlead_…Owning lead.
valuesArray<object>Current exact-name values; requires the separate content-read grant.
namestring 1–100 charsExact stable field name; names are never inferred from labels.
labelstring ≤ 200 charsHuman-readable label.
valuestring ≤ 2000 charsExact string value; an empty string is a stored value, not deletion.
sourcestring May be absentStored provenance, when known.
Possible valuesformcall_extractionmanualcsv
Errors
- 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 409
custom_values_review_requiredCustom values require review - 409
capture_not_readyTeam data is still being prepared - 429
quota_exceededDaily quota exceeded
curl 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/custom-values' \
-H "Authorization: Bearer $TOTEM_API_KEY"{
"object": "lead_custom_values",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"values": [
{
"name": "boat_type",
"label": "Boat type",
"value": "Sailboat",
"source": "manual"
}
]
}PATCH /
Changes up to 50 distinct exact names using the custom-values ETag in If-Match even for no-op requests; omitted values and unknown row attributes remain unchanged, while touched legacy values are migrated or removed atomically. Separate write permission never exports values: the receipt contains counts and a fresh ETag only. Retry the same logical write with the same Idempotency-Key; a replay renders current metadata without restoring old content.
Path parameters
idstring Required ID prefixlead_…The lead's public id.
Query parameters
viewstringSelect the unversioned current source representation.
Headers
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.
If-Matchstring Required 1–300 chars Pattern^"lcv_[a-f0-9]{64}"$The current strong resource ETag, including its quotes; weak tags, wildcards, lists and another resource’s validator are refused.
Request body
Targeted custom-value patch, protected by its own strong If-Match validator.
setArray<object> ≤ 50 itemsSet these exact names; omitted fields remain unchanged.
namestring Required 1–100 charsExact stable field name; names are never inferred from labels.
labelstring Required ≤ 200 charsHuman-readable label.
valuestring Required ≤ 2000 charsExact string value; an empty string is a stored value, not deletion.
removeArray<string> ≤ 50 itemsRemove these exact names, including legacy copies.
Returns
Returns a LeadCustomValuesReceipt object.
objectstringAlways lead_custom_values_receipt.
leadstring ID prefixlead_…Owning lead.
changedbooleanWhether this logical request changed stored custom values.
set_countinteger Range 0–50Exact names set by this logical request.
removed_countinteger Range 0–50Existing exact names removed by this logical request.
Errors
- 400
idempotency_key_requiredIdempotency key required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 409
custom_values_review_requiredCustom values require review - 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 - 412
version_conflictLead version conflict - 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 PATCH 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/custom-values' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
-H "If-Match: ${TOTEM_IF_MATCH:?Set the current quoted resource ETag}" \
-H "Content-Type: application/json" \
--data '{"set": [{"name":"boat_type","label":"Boat type","value":"Sailboat"}]}'{
"object": "lead_custom_values_receipt",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"changed": true,
"set_count": 1,
"removed_count": 0
}PATCH /
Updates the note under this lead incarnation using its current strong note ETag in If-Match; stale versions return 412 version_conflict. Only the note body and this integration’s external id can change, and the response contains metadata without content. An unchanged body creates no new note version.
Path parameters
idstring Required ID prefixlead_…The note’s parent lead id.
notestring Required ID prefixnote_…≤ 256 charsThe opaque note id within this lead incarnation.
Headers
Idempotency-Keystring 1–255 chars Pattern^[\x21-\x7e]+$One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.
If-Matchstring Required 1–300 chars Pattern^"(?:lns1_[a-f0-9]{64}|note_[A-Za-z0-9]+:[1-9][0-9]{0,15})"$The current strong resource ETag, including its quotes; weak tags, wildcards, lists and another resource’s validator are refused.
Request body
Append one integration-authored note. An external id deduplicates within this integration and lead.
bodystring Required 1–20000 charsPlain-text note body; stored with the integration as its author.
external_idstring 1–200 charsYour integration’s external id, scoped to this principal and team; never another integration’s namespace.
response_viewstringReturn metadata for the current source without an inventory capture version.
Returns
Returns a LeadNoteReceipt object.
objectstringPossible valueslead_note_receiptlead_note_source_mutation
Live source metadata or the deleted note identity, never content.
createdboolean ConditionalWhether this logical operation created the note.
deletedboolean ConditionalWhether this operation deleted its reviewed note incarnation.
Errors
- 400
idempotency_key_requiredIdempotency key required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 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 - 412
version_conflictLead version conflict - 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 PATCH 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/notes/note_m3S3yY53i0GJwNn0UPsl4jp3BubIW' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
-H "If-Match: ${TOTEM_IF_MATCH:?Set the current quoted resource ETag}" \
-H "Content-Type: application/json" \
--data '{"body": "Requested an updated proposal for next week."}'{
"object": "lead_note_receipt",
"note": {
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"object": "lead_note",
"livemode": false,
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"created_at": "2026-10-01T09:30:00.000Z",
"external_id": "crm-note-123",
"version": 1,
"updated_at": "2026-10-01T09:30:00.000Z"
}
}DELETE /
Deletes only the named note under this lead incarnation using its current strong note ETag in If-Match; a stale version returns 412 version_conflict. Success returns 204 with no JSON body and the changes feed retains a deletion marker. It never deletes or archives the parent lead.
Path parameters
idstring Required ID prefixlead_…The note’s parent lead id.
notestring Required ID prefixnote_…≤ 256 charsThe opaque note id within this lead incarnation.
Headers
Idempotency-Keystring 1–255 chars Pattern^[\x21-\x7e]+$One unique visible-ASCII key per logical write; reuse exactly on retries and never retry outcome_unknown automatically.
If-Matchstring Required 1–300 chars Pattern^"(?:lns1_[a-f0-9]{64}|note_[A-Za-z0-9]+:[1-9][0-9]{0,15})"$The current strong resource ETag, including its quotes; weak tags, wildcards, lists and another resource’s validator are refused.
Returns
Errors
- 400
idempotency_key_requiredIdempotency key required - 403
team_state_restrictedTeam restricted - 403
sector_restrictedSector restricted - 404
resource_missingResource not found - 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 - 412
version_conflictLead version conflict - 429
quota_exceededDaily quota exceeded
curl -X DELETE 'https://api.totemstudio.ai/v1/leads/lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG/notes/note_m3S3yY53i0GJwNn0UPsl4jp3BubIW' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Idempotency-Key: ${TOTEM_IDEMPOTENCY_KEY:?Set one unique key for this logical write}" \
-H "If-Match: ${TOTEM_IF_MATCH:?Set the current quoted resource ETag}"GET /
Returns a page of the team's boards, each with its stages in pipeline order. Boards also arrive in the changes feed; read this list when you need them at once, for example when a lead names a stage you have not seen yet.
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.
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 Board objects.
objectstringAlways
list.dataArray<Board>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/boards?limit=25' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID"{
"object": "list",
"data": [
{
"id": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"object": "board",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"name": "New patients",
"is_default": true,
"is_archived": false,
"appointment_booked_stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
"stages": [
{
"object": "stage",
"id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
"name": "New",
"position": 0,
"is_default": true,
"is_final": false,
"is_archive": false,
"mode": "automated"
},
{
"object": "stage",
"id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"name": "Contacted",
"position": 1,
"is_default": false,
"is_final": false,
"is_archive": false,
"mode": "supervised"
},
{
"object": "stage",
"id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
"name": "Visit booked",
"position": 2,
"is_default": false,
"is_final": true,
"is_archive": false,
"mode": "standard"
}
],
"version": 4,
"updated_at": "2026-09-02T16:40:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}POST /
Reads the current canonical lead and bounded team context without an export capture version. Hosted executions resolve only their retained source lead. Notes and custom values require their own explicit current content permission before any content read; the business authoring profile is never included.
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-only operational CRM context. Caller-supplied phones, sender ids and authority are not accepted.
lead_idstring ID prefixlead_…Own-team retained lead. Hosted executions may name only their current canonical source lead; omit to resolve it.
conversation_idstring ID prefixconv_…Optional owned retained conversation. Tenant keys may use it for current-message context; hosted executions may name only their exact signed source.
holded_recordsobjectLive hosted customer request only, with a separate Holded content grant.
access_codestring Pattern^\d{12}$The one-time 12-digit customer consultation code; omit to check whether verification is required.
include_notesbooleanExplicitly request bounded note content; requires its separate content grant before any note read.
include_custom_valuesbooleanExplicitly request custom values with their independent content permission.
include_messagesbooleanRequest bounded messages of the exact current signed conversation with its independent content grant.
include_callsbooleanRequest bounded current lead call transcript/summary evidence with its independent transcript grant.
include_paymentsbooleanRequest current exact-lead merchant evidence with the separate payments content permission.
include_recordingsbooleanRequest recording coverage with its separate grant; content stays unavailable until a retained reference adapter exists.
include_attachmentsbooleanRequest attachment coverage with its separate grant; no provider media URL is disclosed.
representationstringAdditionally return the canonical bounded model projections, using the same sanitizer as the existing assistants.
Returns
Returns a CrmContext object.
objectstringAlways crm_context.
source_contactobjectCurrent source contact evidence, independently of whether the conversation is linked to a lead. A tenant without a signed source receives null phone.
phonestring Nullable ≤ 32 charsCurrent canonical transport phone from the authorized retained source, or null when hidden, cleared or unavailable; never an old sender fallback.
conversation_idstring Nullable ID prefixconv_…Current authorized execution conversation, or null for a lead-only tenant context; never an unrelated thread.
call_idstring Nullable ID prefixcall_…Current authorized voice call, or null when no call source exists. A browser session never invents a conversation or premature call.
Current authorized source lead, or null when this conversation is still unlinked.
teamobjectBounded team runtime facts; no assistant prompt or business profile.
namestring Nullable ≥ 1 charsThe team's name as it appears in Totem, or null when none is stored.
timezonestring ≥ 1 charsThe team's IANA time zone: its business-hours zone when that is valid, otherwise its default country's (Europe/Madrid when neither is set). Interpret the team's local times with it.
default_countrystring Nullable Pattern^[A-Z]{2}$The team's default country (ISO 3166-1 alpha-2), which Totem uses when someone types a phone number without a prefix; null when none is set. The API does not apply it:
Lead.phoneis validated without a default country, so a number stored without its country prefix readsphone_status: invalid.idstring ID prefixteam_…Authorized team.
extra_infostring Nullable ≤ 2000 charsThe team’s short runtime extra information, never its authoring business profile.
business_hours_sourcestringWhether the week is configured or uses the normal Monday–Friday 09:00–18:00 fallback.
Possible valuesconfigureddefault
business_hoursobjectCurrent canonical opening week in the team’s time zone.
mondayArray<object>Monday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
tuesdayArray<object>Tuesday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
wednesdayArray<object>Wednesday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
thursdayArray<object>Thursday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
fridayArray<object>Friday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
saturdayArray<object>Saturday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
sundayArray<object>Sunday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
now_businessstringSnapshot time rendered on the business clock with its actual UTC offset.
notesArray<object> Nullable ≤ 20 itemsUp to twenty current retained notes when explicitly requested and authorized; otherwise null.
leadstring ID prefixlead_…The parent lead.
bodystring ≤ 50000 charsCRM note text; requires the explicit note-content grant.
created_atstring Formatdate-timeWhen this note was created.
external_idstring Nullable ≤ 200 charsThe caller’s own external id, or null. Canonical feed objects withhold all integration namespaces.
notes_has_morebooleanMore notes exist beyond this bounded context; use the separately authorized notes endpoint for a full export.
custom_valuesArray<object> NullableCurrent custom values only when requested with their independent content permission; otherwise null.
namestring 1–100 charsExact stable field name; names are never inferred from labels.
labelstring ≤ 200 charsHuman-readable label.
valuestring ≤ 2000 charsExact string value; an empty string is a stored value, not deletion.
sourcestring May be absentStored provenance, when known.
Possible valuesformcall_extractionmanualcsv
automationobject NullableCurrent CRM automation metadata, separate from permission and consent.
flagsobjectCurrent effective automation flags, including durable holds.
archivedbooleanCurrent recorded operational flag.
pausedbooleanCurrent recorded operational flag.
needs_human_attentionbooleanCurrent recorded operational flag.
holdobject NullableCanonical hold reason and time; private appointment ids are withheld.
reasonstringCanonical durable hold reason.
sincenumberRecorded hold start in epoch milliseconds.
stateobjectCurrent source state only; it never authorizes or schedules outreach.
roundnumber NullableCurrent recorded number, or null when unknown.
currentStepnumber NullableCurrent recorded number, or null when unknown.
stepEnteredAtnumber NullableCurrent recorded number, or null when unknown.
roundExhaustedAtnumber NullableCurrent recorded number, or null when unknown.
completedAtnumber NullableCurrent recorded number, or null when unknown.
completionReasonstring NullableCurrent stored text, or null when unavailable.
scheduledContactAtnumber NullableCurrent recorded number, or null when unknown.
scheduledContactTypestring NullableCurrent stored text, or null when unavailable.
scheduledContactNotestring NullableCurrent stored text, or null when unavailable.
coolOffUntilnumber NullableCurrent recorded number, or null when unknown.
contactCountnumber NullableCurrent recorded number, or null when unknown.
hasBeenReachedbooleanCurrent recorded operational flag.
contact_limitsobjectExisting effective canonical safety limits; unknown malformed stored values remain null.
maxContactsPerLeadPerDaynumber NullableCurrent recorded number, or null when unknown.
maxTotalContactsPerLeadnumber NullableCurrent recorded number, or null when unknown.
coolOffPeriodDaysnumber NullableCurrent recorded number, or null when unknown.
maxReactivationRoundsnumber NullableCurrent recorded number, or null when unknown.
maxCallAttemptsPerStepnumber May be absent NullableCurrent recorded number, or null when unknown.
pipelineobject NullableCurrent authorized pipeline facts; opaque ids can be used with the public business operations.
stageobject NullableCurrent stage, including archived history.
idstring ID prefixstg_…Current opaque stage id.
namestring NullableCurrent stored text, or null when unavailable.
modestring NullableCurrent stored text, or null when unavailable.
positionnumber NullableCurrent recorded number, or null when unknown.
is_defaultbooleanCurrent recorded operational flag.
is_finalbooleanCurrent recorded operational flag.
is_archivebooleanCurrent recorded operational flag.
contextstring NullableCurrent stored text, or null when unavailable.
boardobject NullableCurrent board metadata with canonical stage selection.
idstring ID prefixbrd_…Current opaque board.
namestring NullableCurrent stored text, or null when unavailable.
typestring NullableCurrent stored text, or null when unavailable.
is_archivedbooleanCurrent recorded operational flag.
goalstring NullableCurrent stored text, or null when unavailable.
extra_infostring NullableCurrent stored text, or null when unavailable.
stagesArray<object> ≤ 40 itemsCurrent non-archive destination stages.
idstring ID prefixstg_…Current opaque stage id.
namestring NullableCurrent stored text, or null when unavailable.
modestring NullableCurrent stored text, or null when unavailable.
positionnumber NullableCurrent recorded number, or null when unknown.
is_defaultbooleanCurrent recorded operational flag.
is_finalbooleanCurrent recorded operational flag.
is_archivebooleanCurrent recorded operational flag.
contextstring NullableCurrent stored text, or null when unavailable.
routingobject NullableOnly the destinations currently allowed by the product’s one-time conversation routing policy.
instructionstringCanonical one-time routing instruction.
currentBoardNamestring NullableCurrent stored text, or null when unavailable.
boardsArray<object> ≤ 12 itemsCurrent permitted alternative boards.
idstring ID prefixbrd_…Allowed opaque board destination.
namestring NullableCurrent stored text, or null when unavailable.
descriptionstring NullableCurrent stored text, or null when unavailable.
goalstring NullableCurrent stored text, or null when unavailable.
stagesArray<object> ≤ 15 itemsSelectable destinations from the canonical routing policy.
idstring ID prefixstg_…Allowed opaque routing destination.
namestring NullableCurrent stored text, or null when unavailable.
entrybooleanCurrent recorded operational flag.
membersArray<object> ≤ 1000 itemsCurrent active own-team roster, without email addresses or raw user ids.
idstring ID prefixmem_…Opaque active team member.
display_namestring NullableCurrent stored text, or null when unavailable.
cadenceobject NullableActual safe effective timing and section metadata, or null without a current board.
sectionsArray<object> ≤ 4 itemsThe four actual effective runtime sections.
namestringCanonical runtime sequence.
Possible valuesmainreactivationfollowUpstageEntry
sourcestringActual inherited configuration source.
Possible valuesstageboardmain_fallbacknone
step_countnumber NullableCurrent recorded number, or null when unknown.
stepsArray<object> ≤ 20 itemsBounded timing/channel description; no template, account or provider ids.
indexinteger Range ≥ 0Zero-based effective sequence position.
channelstringBusiness channel only; provider and sender selectors are withheld.
Possible valuescallwhatsappemailunknown
delay_minutesnumber NullableCurrent recorded number, or null when unknown.
has_morebooleanCurrent recorded operational flag.
conversation_stale_hoursnumber NullableCurrent recorded number, or null when unknown.
stage_entry_delay_minutesnumber NullableCurrent recorded number, or null when unknown.
bypass_business_hoursbooleanCurrent recorded operational flag.
runtimeobjectNamed current operational language, routing and verified legal/privacy facts; no destination members or authoring profile.
preferred_languagestringCanonical operational team language.
notification_language_instructionstringExisting instruction for internal team notification language.
notification_departmentsArray<object>Current usable routing directory, without recipient identities.
idstringSaved natural department routing key, not a credential or member id.
namestringCurrent department name.
descriptionstringAuthored department responsibility description.
default_department_idstring NullableSaved default department key, or null.
notifications_enabledbooleanWhether the current business routing configuration is enabled.
controller_namestring NullableVerified current legal controller name, including canonical organization inheritance.
privacy_policy_urlstring NullableCurrent effective privacy disclosure URL, or null when none is published.
family_routingobject May be absent NullableCurrent configured organization routing only with the separately issued handoff capability; omitted for older or context-only grants.
instructionstring NullableCurrent stored text, or null when unavailable.
officesArray<object> ≤ 50 itemsBounded current configured organization directory, disclosed only with the independently issued handoff capability.
officestringExact current configured office slug.
namestring NullableCurrent stored text, or null when unavailable.
coveragestring NullableCurrent stored text, or null when unavailable.
preferred_languagestring NullableCurrent stored text, or null when unavailable.
boardsArray<object> ≤ 100 itemsCurrent configured eligible destination boards; no raw board or team ids.
idstring ID prefixbrd_…Opaque eligible configured board, usable only with the organization handoff action.
namestring NullableCurrent stored text, or null when unavailable.
is_defaultbooleanCurrent recorded operational flag.
Explicitly granted exact current conversation messages, or null when not requested/unavailable.
callsArray<object> Nullable ≤ 10 itemsExplicitly granted current lead call evidence, or null when not requested/unavailable.
idstring ID prefixcall_…Opaque current call incarnation.
directionstring NullableRecorded call direction.
Possible valuesinboundoutbound
started_atstring Nullable Formatdate-timeCurrent call start time, or null when unknown.
outcomestringCanonical transport outcome; distinct from the model snapshot’s business contact-log outcome.
Possible valuesanswered_humananswered_aivoicemailno_answerbusyfailedunknown
summarystring Nullable ≤ 2000 charsExplicitly granted bounded stored call summary.
sentimentstring Nullable ≤ 120 charsExplicitly granted stored call sentiment, when present.
transcriptstring Nullable ≤ 16000 charsExplicitly granted stored transcript text, when present.
transcript_truncatedbooleanWhether the stored transcript exceeds this bounded view.
paymentsobject NullableExplicitly granted canonical customer payment evidence. Opaque display ids never authorize an action; incomplete never means unpaid.
completebooleanWhether the canonical merchant reader proved complete history.
checkedAtnumber NullableCurrent recorded number, or null when unknown.
itemsArray<object> ≤ 5 itemsAt most five canonical current customer payment evidence items.
idstring Pattern^payment_[a-f0-9]{64}$Opaque display-only evidence digest; never a selector or capability.
statusstringCanonical financial evidence status.
Possible valuespaidpendingprocessingfailedexpiredcancelledrefundedpartially_refundedreview
amountMinorinteger Range ≥ 0Expected amount in minor currency units.
amountReceivedMinorinteger Range ≥ 0Actually received amount in minor currency units.
refundedAmountMinorinteger Nullable Range ≥ 0Known refunded amount in minor units, or null when unknown.
currencystring Pattern^[a-z]{3}$Lowercase three-letter currency code.
createdAtnumber NullableCurrent recorded number, or null when unknown.
descriptionstring NullableCurrent stored text, or null when unavailable.
referencestring NullableOpaque booking-payment reference when present; no provider id.
livemodebooleanTrue only for real merchant evidence; test data is never live proof.
verificationstringWhether this evidence was checked against Stripe or is stored-only.
Possible valuesstripestored
checkedAtnumber NullableCurrent recorded number, or null when unknown.
appointmentStatusstring NullableCurrent stored text, or null when unavailable.
amountHumanstring May be absentCanonical human-readable amount, when supplied.
createdAtHumanstring May be absentCanonical human-readable date, when supplied.
holded_recordsobject May be absentOnly records explicitly shared with this verified customer. No Holded contact ID, internal case notes or attachments.
statusstringOutcome of the customer consultation.
Possible valuesverification_requirednot_verifiedunavailableok
estimatesobject NullableThe verified customer’s approved quotes, when available.
itemsArray<object> ≤ 5 itemsUp to five recent approved quotes.
referencestring 1–100 charsQuote number visible to the customer.
statusstringCurrent quote status.
Possible valuespendingacceptedpartialcancelledrejectedoverdue
datestring Nullable Pattern^\d{4}-\d{2}-\d{2}$Issue date when available.
validUntilstring Nullable Pattern^\d{4}-\d{2}-\d{2}$Expiry date when available.
totalstring Nullable ≤ 24 charsTotal as a decimal string when available.
currencystring Nullable 3 charsCurrency code when available.
completebooleanWhether the quote list is complete.
casesArray<object> Nullable ≤ 5 itemsCases shared with the verified customer, when available.
kindstringType of case shared by the team.
Possible valuesprojectopportunity
referencestring Nullable 1–100 charsCase reference when available.
titlestring Nullable 1–100 charsCase name when available.
statusstring NullableKnown case status, or null if not available for this record.
Possible valuesarchivedopenwonlost
casesCompletebooleanWhether every shared case could be read.
coverageobjectExplicit coverage for every independently authorized content section.
notesobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
custom_valuesobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
messagesobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
callsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
paymentsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
recordingsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
attachmentsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
model_contextobject NullableOptional canonical model-facing projections with the existing sanitizer and exact total budgets; typed context remains separate.
context_jsonstring ≤ 20000 charsJSON serialized only after the canonical model projector and total content budget.
lead_automation_jsonstring Nullable ≤ 8000 charsCanonical lean automation JSON, or null without a current lead.
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 - 412
version_conflictLead version conflict
# 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/crm/context' \
-H "Authorization: Bearer $TOTEM_API_KEY" \
-H "Totem-Team: $TOTEM_TEAM_ID" \
-H "Content-Type: application/json" \
--data '{"lead_id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG"}'{
"object": "crm_context",
"source_contact": {
"phone": null
},
"conversation_id": null,
"call_id": null,
"lead": null,
"team": {
"name": "Example Dental",
"timezone": "Europe/Madrid",
"default_country": "ES",
"id": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"extra_info": null,
"business_hours_source": "configured",
"business_hours": {
"monday": [
{
"start": "09:00",
"end": "18:00"
}
],
"tuesday": [
{
"start": "09:00",
"end": "18:00"
}
],
"wednesday": [
{
"start": "09:00",
"end": "18:00"
}
],
"thursday": [
{
"start": "09:00",
"end": "18:00"
}
],
"friday": [
{
"start": "09:00",
"end": "18:00"
}
],
"saturday": [],
"sunday": []
},
"now_business": "2026-10-01T11:30:00+02:00"
},
"notes": null,
"notes_has_more": false,
"custom_values": null,
"automation": null,
"pipeline": null,
"runtime": {
"preferred_language": "en",
"notification_language_instruction": "Use English.",
"notification_departments": [],
"default_department_id": null,
"notifications_enabled": false,
"controller_name": null,
"privacy_policy_url": null
},
"messages": null,
"calls": null,
"payments": null,
"coverage": {
"notes": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"custom_values": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"messages": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"calls": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"payments": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"recordings": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"attachments": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
}
},
"model_context": null
}POST /
Persists a requested callback after current recipient, consent, hold, channel and thirty-day checks; select an owned lead or a genuinely new contact, while hosted execution may derive its exact source. New registration and scheduling share the canonical transaction, and the receipt proves a saved promise without claiming delivery. Reuse Idempotency-Key; optional current source If-Match protects a reviewed existing lead.
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.
If-Matchstring 1–300 chars Pattern^"lrs1_[a-f0-9]{64}"$The current strong resource ETag, including its quotes; weak tags, wildcards, lists and another resource’s validator are refused.
Request body
Schedule the existing canonical delayed-contact action. Hosted executions can omit lead_id to resolve their current source. No caller-supplied provider, sender, raw source or authority is accepted.
lead_idstring ID prefixlead_…Current own-team lead. Hosted executions may only name their canonical current source lead.
new_contactobjectCreate a genuinely new contact and schedule through the same canonical intake operation; cannot be combined with lead_id.
namestring Required 1–100 charsName supplied by the person for a genuinely new contact.
phonestring Required 1–80 charsPhone supplied by the person; never used as proof of source ownership.
contact_atstring Required Formatdate-timeRequested future contact time, strictly within thirty days of admission.
channelstring RequiredRequested business channel; current recipient and delivery configuration are validated by the server.
Possible valuescallwhatsapp
notestring ≤ 500 charsOperational callback note only; never a model prompt or call objective.
customer_confirmedboolean RequiredExplicit attestation that the person requested this contact time; it never overrides opt-outs or current holds.
Valuetrue
Returns
Returns a ScheduledContactReceipt object.
objectstringAlways scheduled_contact_receipt.
leadLeadSourceReceiptcontact_atstring Formatdate-timeThe time committed to the existing delayed-contact dispatcher.
channelstringCommitted contact channel. This receipt does not claim provider delivery.
Possible valuescallwhatsapp
createdbooleanWhether this operation genuinely created the contact.
Errors
- 400
idempotency_key_requiredIdempotency key required - 400
team_requiredTeam required - 403
inbound_not_enabledInbound intake not enabled - 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
ambiguous_identityAmbiguous lead identity - 409
capture_not_readyTeam data is still being prepared - 412
version_conflictLead version conflict - 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/crm/scheduled-contact' \
-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 "If-Match: ${TOTEM_IF_MATCH:?Set the current quoted resource ETag}" \
-H "Content-Type: application/json" \
--data '{"lead_id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG", "contact_at": "2026-11-05T10:00:00.000Z", "channel": "call", "customer_confirmed": true}'{
"object": "scheduled_contact_receipt",
"lead": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"etag": "\"lrs1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z",
"object": "lead_source_receipt"
},
"contact_at": "2026-10-02T09:30:00.000Z",
"channel": "call",
"created": false
}POST /
Uses the configured organization directory and current owned source; tenant integrations select their lead while hosted execution derives its retained conversation, call or voice session. An unverified identity cannot take over an existing destination contact, and ambiguity follows human review. The content-free receipt grants no general cross-team access and does not claim delivery of a queued notification.
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
Use the existing configured organization handoff. No arbitrary destination team, source identifier or assistant authority can be supplied.
automation_modestringPreserve the existing idle automation cursor, callbacks and follow-ups when the configured destination is compatible; otherwise fail without moving. Omit for existing handoff behavior.
Possible valuespreservedefault
lead_idstring ID prefixlead_…Owned retained source lead, required for tenant keys; hosted execution may derive its current source without a lead yet.
officestring 1–128 charsExact configured organization office slug; omit for the current office.
board_idstring ID prefixbrd_…Opaque current board from that configured office; omit for its canonical default.
summarystring Required 1–4000 charsQualified need for the receiving office, preserving relevant customer statements.
namestring ≤ 200 charsName supplied by the person; existing canonical identity stays authoritative.
phonestring ≤ 80 charsPhone supplied by the person for the referral; never proof of authority over an existing contact.
emailstring Formatemail≤ 254 chars Pattern^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Email supplied by the person; ambiguity is routed to canonical human review.
Returns
Returns a FamilyHandoffReceipt object.
objectstringAlways family_handoff_receipt.
statusstringCanonical accepted disposition, or identity ambiguity awaiting human review.
Possible valuesacceptedneeds_review
officestringConfigured receiving office slug; no internal destination team id.
moved_sourcebooleanWhether the canonical source lead was transferred, preserving pending-work fences.
notification_queuedbooleanTrue only when the canonical notification and push outbox were committed. This does not claim delivery.
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 - 412
version_conflictLead version conflict - 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/crm/handoff' \
-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", "summary": "Requested a consultation with the current office."}'{
"object": "family_handoff_receipt",
"status": "accepted",
"office": "example",
"moved_source": false,
"notification_queued": true
}POST /
Submits a consented referral through the canonical CRM engine to the fixed Totem intake; the source lead provides provenance without selecting or granting destination access. The neutral received acknowledgement reveals neither destination identity nor existing matches, and unverified matching records remain unchanged. Attest consent and reuse Idempotency-Key for retries.
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
Refer an interested person to the one fixed Totem product destination. Caller-supplied destination teams, channels, provider ids and authority are forbidden.
namestring Required 1–200 charsReal name supplied by the person; placeholder names are rejected.
phonestring Pattern^\+[1-9][0-9]{6,14}$Contact phone in E.164. Hosted execution may omit it only when its actual retained transport supplies a current verified phone; hidden source identifiers never become phones.
notestring Required 1–5000 charsQualified context for the fixed Totem referral; source provenance is attached only by the server.
tagsArray<string> ≤ 50 itemsBusiness tags for a genuinely new referred contact. Existing destination tags remain authoritative.
consentboolean RequiredExplicit attestation that the person wants Totem AI/automation contact. It is not WhatsApp marketing consent and never overrides the destination review policy.
Valuetrue
lead_idstring ID prefixlead_…Optional owned source lead for provenance. Hosted execution may name only its current lead; this never selects or grants access to a Totem destination contact.
Returns
Returns a ReferralReceipt object.
objectstringAlways referral_receipt.
statusstringSubmission received. Unverified duplicates are acknowledged neutrally without changing or identifying an existing contact. This does not claim approval, outreach or provider delivery.
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/referrals/totem' \
-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 '{"name": "Alex Rivera", "phone": "+12025550123", "note": "Requested information about Totem automation.", "consent": true}'{
"object": "referral_receipt",
"status": "received"
}POST /
Records the caller’s external calculator and delivery attestation against its current owned source, reusing configured commercial disposition and one-shot review or closure effects. Totem does not independently verify those external facts; callers cannot select destination teams, providers, private effects or attempt tokens. Current source, configuration and authority are rechecked before effects; reuse Idempotency-Key and reconcile outcome_unknown before repeating.
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
Attest external calculator and delivery facts, then apply the existing configured quote disposition and one-shot effects. No caller-selected provider, destination, attempt token or raw source identifier is accepted.
lead_idstring ID prefixlead_…Current own-team lead; hosted execution may only name its current canonical source lead.
conversation_idstring ID prefixconv_…Exact current owned conversation for tenant integrations; hosted executions derive their retained source.
call_idstring ID prefixcall_…Exact current owned call, as an alternative to conversation_id.
quote_referencestring Required 1–256 charsStable reference from the external calculator, scoped to this lead and source.
quote_revision_hashstring Required Pattern^[a-f0-9]{64}$SHA-256 of the exact external calculator revision attested by the caller.
quotedboolean RequiredWhether the external calculator produced a numeric offer accepted for delivery.
reasonstringCanonical refusal or review reason. Omit for a numeric offer.
Possible valuesBELOW_MINIMUMBELOW_MINIMUM_REQUIRES_REVIEWABOVE_MAXIMUMABOVE_MAXIMUM_REQUIRES_REVIEWPERSONAL_STUDY_REQUIRED
summarystring ≤ 1500 chars DefaultQualified quote summary for canonical CRM history or configured review email; never a model prompt.
deliveriesArray<object> ≤ 2 itemsAt most one attested receipt per supported channel. Numeric quotes require a receipt; refusals cannot carry proposal deliveries.
channelstring RequiredExternal delivery channel attested by the caller.
Possible valuesemailwhatsapp
external_receiptstring Required 1–256 charsExternal acceptance reference supplied and attested by the caller; Totem does not independently verify it.
accepted_atstring Required Formatdate-timeExternal acceptance time attested by the caller; must be current.
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/crm/quote-outcomes' \
-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", "conversation_id": "conv_m3GhGjRHmFbww1g10oqOp7j3gWqPJ", "quote_reference": "example-quote-123", "quote_revision_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "quoted": false, "reason": "PERSONAL_STUDY_REQUIRED"}'{
"object": "operation",
"id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
"status": "queued",
"endpoint": "quotes.recordOutcome",
"created_at": "2026-10-01T09:30:00.000Z",
"updated_at": "2026-10-01T09:30:00.000Z",
"result": null,
"error": null
}A lead or client record: lead fields only.
Attributes
idstring ID prefixlead_…Public id of the record.
objectstringAlways
lead.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team the record belongs to.
record_kindstringleadwhen the record has a pipeline status, otherwiseclient. A lead whose status this version does not know readsstatus: null.Possible valuesleadclient
namestring NullableFirst name or display name, or null.
surnamestring NullableSurname, or null.
date_of_birthstring Nullable FormatdatePattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Civil date of birth in YYYY-MM-DD, without a time or timezone; null when missing, cleared or invalid.
emailstring NullableEmail address as stored, or null.
companystring NullableCompany, or null.
websitestring NullableContact website as stored, without fetching it, or null.
phonestring NullablePhone in E.164, only when the stored number validates; otherwise null.
phone_statusstringvalid(seephone),invalid(a number is stored but does not validate, for example one stored without its country prefix) ormissing.Possible valuesvalidinvalidmissing
statusstring NullablePipeline status; null for a client record, or for a status this version does not know.
convertedis not "won".Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
status_set_bystring NullableWho set the current status: a person, the AI, Totem automation, an API caller, or unknown (no recorded transition lands on it). Null when
statusis null.Possible valueshumanaisystemapiunknown
archive_reasonstring NullableWhy the record was archived, as a closed code; stored free text is
other. Null when none is stored.Possible valuesopt_outno_consentnot_interestednot_qualifiedno_contactmergedfamily_transferother
archived_from_statusstring NullableThe status the lead had before its current archive; null while it is not archived or when unknown.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
contact_permissionsobjectContact permissions. Apply them before any outreach from your own systems.
do_not_contactbooleanTrue when the person asked never to be contacted (the
opt_outarchive reason). Stop every channel.email_opt_outbooleanTrue when the person unsubscribed from marketing and follow-up email.
email_opt_out_atstring Nullable Formatdate-timeWhen the email opt-out was recorded, or null.
whatsapp_consentboolean NullableWhatsApp consent: false when refused, true when recorded, null when unknown.
provenanceobjectThe source of each permission.
do_not_contactstring NullableWhere
do_not_contactcomes from, or null when it is false.Possible valuesarchive_reason
email_opt_outstring NullableWho recorded the email opt-out: the unsubscribe link, a person in Totem, or unknown. Null when there is none.
Possible valuesunsubscribe_linkmanualunknown
whatsapp_consentstring Nullablearchive_reasonwhen a refusal is recorded as the archive reason;storedfor the value kept on the record, which team members can edit. Null when unknown.Possible valuesstoredarchive_reason
merged_intostring Nullable ID prefixlead_…The lead this record was merged into, or null (also when that lead no longer exists).
transferred_toobject NullableWhere a transfer to another team of your organization sent this lead, or null. The team may be one your key does not read.
teamstring ID prefixteam_…The destination team.
leadstring Nullable ID prefixlead_…The destination lead, or null when its id cannot be named across teams: an assistant handoff created it, or the transfer landed on an existing lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.
revived_atstring Nullable Formatdate-timeWhen the contact last came back on their own and revived an archived lead, or null.
pipeline_clearedbooleanTrue when the lead was converted with "clear pipeline data": board, stage, priority, assignees, estimated value and the source fields other than
source_channelare null because they were cleared.converted_atstring Nullable Formatdate-timeWhen the lead was converted, while its status is
converted; otherwise null.value_at_conversionnumber NullableThe estimated value when it was converted, in major units. Survives "clear pipeline data".
prioritystring NullablePriority, or null.
Possible valueslowmediumhighurgent
tagsArray<string>Labels as stored.
leadandbookingare system labels.boardstring Nullable ID prefixbrd_…The board, resolved through the stage when it has one; or null.
stagestring Nullable ID prefixstg_…The stage, or null.
assigneesArray<string> Nullable ID prefixmem_…Assigned members, sorted. Null when the record has no pipeline data.
estimated_valuenumber NullableEstimated value in major units as stored (decimals allowed), or null.
estimated_value_currencynull NullableAlways null: Totem stores no currency with the value.
sourcestring NullableThe stored lead source;
apialso covers leads created by Totem itself (for example from a conversation or a call), seesource_detail. Null when none is stored.Possible valuesmeta_lead_adsmanualwebsite_formbooking_pagecsv_importapichatbotgoogle_adslinkedinother
source_channelstring NullableThe channel the record started on (for example
whatsapp,phone,widget), or null. Team members can edit it.source_detailstring Nullableconversation,call,external:<provider>,gated_ad:<source>,family_handoff,api_intakeorunknown; null whensourceneeds no detail.source_provenancestring Nullableserver_writtenwhen Totem set the source from what the ad platform reported; otherwisemember_editable(team members can change it). Null withsource.Possible valuesserver_writtenmember_editable
created_atstring Formatdate-timeWhen the record was created.
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": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z"
}A lead with its attribution and response facets, each with its own version. A facet is null only while Totem is still preparing it.
Attributes
idstring ID prefixlead_…Public id of the record.
objectstringAlways
lead.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team the record belongs to.
record_kindstringleadwhen the record has a pipeline status, otherwiseclient. A lead whose status this version does not know readsstatus: null.Possible valuesleadclient
namestring NullableFirst name or display name, or null.
surnamestring NullableSurname, or null.
date_of_birthstring Nullable FormatdatePattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Civil date of birth in YYYY-MM-DD, without a time or timezone; null when missing, cleared or invalid.
emailstring NullableEmail address as stored, or null.
companystring NullableCompany, or null.
websitestring NullableContact website as stored, without fetching it, or null.
phonestring NullablePhone in E.164, only when the stored number validates; otherwise null.
phone_statusstringvalid(seephone),invalid(a number is stored but does not validate, for example one stored without its country prefix) ormissing.Possible valuesvalidinvalidmissing
statusstring NullablePipeline status; null for a client record, or for a status this version does not know.
convertedis not "won".Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
status_set_bystring NullableWho set the current status: a person, the AI, Totem automation, an API caller, or unknown (no recorded transition lands on it). Null when
statusis null.Possible valueshumanaisystemapiunknown
archive_reasonstring NullableWhy the record was archived, as a closed code; stored free text is
other. Null when none is stored.Possible valuesopt_outno_consentnot_interestednot_qualifiedno_contactmergedfamily_transferother
archived_from_statusstring NullableThe status the lead had before its current archive; null while it is not archived or when unknown.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
contact_permissionsobjectContact permissions. Apply them before any outreach from your own systems.
do_not_contactbooleanTrue when the person asked never to be contacted (the
opt_outarchive reason). Stop every channel.email_opt_outbooleanTrue when the person unsubscribed from marketing and follow-up email.
email_opt_out_atstring Nullable Formatdate-timeWhen the email opt-out was recorded, or null.
whatsapp_consentboolean NullableWhatsApp consent: false when refused, true when recorded, null when unknown.
provenanceobjectThe source of each permission.
do_not_contactstring NullableWhere
do_not_contactcomes from, or null when it is false.Possible valuesarchive_reason
email_opt_outstring NullableWho recorded the email opt-out: the unsubscribe link, a person in Totem, or unknown. Null when there is none.
Possible valuesunsubscribe_linkmanualunknown
whatsapp_consentstring Nullablearchive_reasonwhen a refusal is recorded as the archive reason;storedfor the value kept on the record, which team members can edit. Null when unknown.Possible valuesstoredarchive_reason
merged_intostring Nullable ID prefixlead_…The lead this record was merged into, or null (also when that lead no longer exists).
transferred_toobject NullableWhere a transfer to another team of your organization sent this lead, or null. The team may be one your key does not read.
teamstring ID prefixteam_…The destination team.
leadstring Nullable ID prefixlead_…The destination lead, or null when its id cannot be named across teams: an assistant handoff created it, or the transfer landed on an existing lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.
revived_atstring Nullable Formatdate-timeWhen the contact last came back on their own and revived an archived lead, or null.
pipeline_clearedbooleanTrue when the lead was converted with "clear pipeline data": board, stage, priority, assignees, estimated value and the source fields other than
source_channelare null because they were cleared.converted_atstring Nullable Formatdate-timeWhen the lead was converted, while its status is
converted; otherwise null.value_at_conversionnumber NullableThe estimated value when it was converted, in major units. Survives "clear pipeline data".
prioritystring NullablePriority, or null.
Possible valueslowmediumhighurgent
tagsArray<string>Labels as stored.
leadandbookingare system labels.boardstring Nullable ID prefixbrd_…The board, resolved through the stage when it has one; or null.
stagestring Nullable ID prefixstg_…The stage, or null.
assigneesArray<string> Nullable ID prefixmem_…Assigned members, sorted. Null when the record has no pipeline data.
estimated_valuenumber NullableEstimated value in major units as stored (decimals allowed), or null.
estimated_value_currencynull NullableAlways null: Totem stores no currency with the value.
sourcestring NullableThe stored lead source;
apialso covers leads created by Totem itself (for example from a conversation or a call), seesource_detail. Null when none is stored.Possible valuesmeta_lead_adsmanualwebsite_formbooking_pagecsv_importapichatbotgoogle_adslinkedinother
source_channelstring NullableThe channel the record started on (for example
whatsapp,phone,widget), or null. Team members can edit it.source_detailstring Nullableconversation,call,external:<provider>,gated_ad:<source>,family_handoff,api_intakeorunknown; null whensourceneeds no detail.source_provenancestring Nullableserver_writtenwhen Totem set the source from what the ad platform reported; otherwisemember_editable(team members can change it). Null withsource.Possible valuesserver_writtenmember_editable
created_atstring Formatdate-timeWhen the record was created.
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.
The lead's attribution facet, or null while Totem is still preparing it.
The lead's response facet, or null while Totem is still preparing it.
{
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"version": 3,
"updated_at": "2026-09-28T10:20:01.250Z",
"attribution": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_attribution",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"original_capture": {
"capture": "at_creation",
"captured_at": "2026-09-28T10:15:00.000Z",
"source": "meta_lead_ads",
"source_hint": null,
"source_channel": null,
"external_provider": null,
"received_at": "2026-09-28T10:15:00.000Z",
"submitted_at": "2026-09-28T10:14:30.000Z",
"origin": null,
"campaign": {
"id": {
"value": "120210000000000101",
"provenance": "provider"
},
"name": {
"value": "Spring check-up",
"provenance": "provider"
}
},
"ad": {
"id": {
"value": "120210000000000303",
"provenance": "provider"
},
"name": {
"value": "Free first visit",
"provenance": "provider"
}
},
"ad_set": {
"id": {
"value": "120210000000000202",
"provenance": "provider"
},
"name": {
"value": "Families nearby",
"provenance": "provider"
}
},
"ad_group": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"form": {
"id": {
"value": "900000000000000404",
"provenance": "provider"
},
"name": {
"value": "Book a check-up",
"provenance": "provider"
}
},
"creative": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"asset_group": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"page": {
"id": {
"value": "100000000000000505",
"provenance": "provider"
},
"name": {
"value": "Example Dental",
"provenance": "provider"
}
},
"utm": null,
"click_network": {
"value": null,
"provenance": "not_captured"
},
"ad_referral": null,
"family_origin": null,
"audience": {
"value": null,
"missing_reason": "unsupported"
}
},
"original_capture_missing_reason": null,
"latest_submission": null,
"latest_submission_missing_reason": "not_captured",
"version": 1,
"updated_at": "2026-09-28T10:15:02.100Z"
},
"response": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_response",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"last_inbound_at": "2026-10-01T08:58:00.000Z",
"last_outbound_at": "2026-10-01T08:59:30.000Z",
"awaiting_reply": false,
"last_answered_call_at": "2026-09-28T10:17:00.000Z",
"last_whatsapp_delivery_status": "read",
"coverage": {
"conversations": 2,
"calls": 1,
"channels_without_delivery_data": [
"email"
],
"truncated": false
},
"version": 7,
"updated_at": "2026-10-01T08:59:31.040Z"
}
}Where a lead came from: its original capture and latest submission.
Attributes
idstring ID prefixlead_…Public id of the record.
objectstringAlways
lead_attribution.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team the lead belongs to.
original_captureobject NullableHow the lead first entered the CRM, frozen once; null when it was not captured. "Original" is the first time the contact entered the CRM, not the first ad it answered.
capturestringat_creation: frozen from the lead as it was first saved.at_activation: copied once from the lead as it was when the API was activated, for a lead with no capture record (created before Totem started recording attribution, or whose creation was not recorded).Possible valuesat_creationat_activation
captured_atstring Formatdate-timeWhen the record was written.
sourcestring NullableThe lead source at capture, from the same set as the lead's
source;apialso covers leads created by Totem itself (for example from a conversation or a call, seeorigin). Null when none was stored.Possible valuesmeta_lead_adsmanualwebsite_formbooking_pagecsv_importapichatbotgoogle_adslinkedinother
source_hintstring NullableThe real source of a gated ad lead stored as
api, or null.source_channelstring NullableThe channel at capture, or null.
external_providerstring NullableThe portal or booking platform of a forwarded or synced lead, or null.
received_atstring Nullable Formatdate-timeWhen the lead was received, as first written, or null.
submitted_atstring Nullable Formatdate-timeWhen the ad platform says the form was submitted, or null.
originobject NullableThe conversation or call that created the lead (never its id), or null (also for an origin of another kind).
kindstringconversationorcall.Possible valuesconversationcall
channelstring NullableIts channel, or null.
campaignobjectThe campaign.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
adobjectThe ad.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
ad_setobjectThe Meta ad set.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
ad_groupobjectThe Google Ads ad group.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
formobjectThe lead form.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
creativeobjectThe creative.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
asset_groupobjectThe Google Ads asset group.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
pageobjectThe Facebook page.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
utmobject NullableThe five standard UTM keys, or null when none was captured.
sourceobjectutm_source.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
mediumobjectutm_medium.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
campaignobjectutm_campaign.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
termobjectutm_term.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
contentobjectutm_content.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
click_networkobjectThe network of the first click id (
googleormeta). The click id itself is never kept.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
ad_referralobject NullableThe first Meta ad referral of the conversation that created the lead, or null.
channelstringThe channel.
Possible valueswhatsappfacebookinstagram
source_typestringWhat opened the conversation.
Possible valuesadpostlinkother
ad_idstring NullableThe ad or post id, or null.
referred_atstring Formatdate-timeMeta's time for the referral.
provenancestringAlways
provider: only the signed Meta webhooks write it.
family_originobject NullableThe transfer from another team of your organization that created the lead, or null.
teamstring ID prefixteam_…The team of your organization the lead came from.
leadstring Nullable ID prefixlead_…Its lead there, or null when that id cannot be named across teams: an assistant handed off a caller without one, or the lead there is a lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.
automatedtells an assistant's handoff from a move made by a person.automatedbooleanTrue for an assistant's handoff.
audienceobjectNot available in this version.
valuenull NullableAlways null.
missing_reasonstringTotem does not record audiences; an ad set is not one.
Valueunsupported
original_capture_missing_reasonstring Nullablenot_capturedwhenoriginal_captureis null, otherwise null.Possible valuesnot_captured
latest_submissionobject NullableThe newest ad submission recorded for this lead, including a repeat on an existing contact; null when none is recorded. A submission the ad platform reports deleted (a LinkedIn member deleting their form response) is no longer shown, and once the newest one expires or is withdrawn an older one can show instead.
providerstringThe ad platform.
Possible valuesmetagoogle_adslinkedin
submitted_atstring Nullable Formatdate-timeWhen the platform says it was submitted, or null.
campaignobjectThe campaign.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
adobjectThe ad.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
ad_setobjectThe Meta ad set.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
ad_groupobjectThe Google Ads ad group.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
formobjectThe lead form.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
nameobjectIts name.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
creativeobjectThe creative.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
asset_groupobjectThe Google Ads asset group.
idobjectIts id.
valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
utmobject NullableIts UTM keys, or null.
sourceobjectutm_source.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
mediumobjectutm_medium.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
campaignobjectutm_campaign.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
termobjectutm_term.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
contentobjectutm_content.valuestring NullableThe value, or null when it was not captured.
provenancestringprovider(reported by the ad platform),team_alias(typed by staff),stored_metadata(editable lead data),stored_metadata_at_activation(copied once when the API was activated, for a lead created before capture), ornot_capturedexactly whenvalueis null.Possible valuesproviderteam_aliasstored_metadatastored_metadata_at_activationnot_captured
expires_atstring Nullable Formatdate-timeWhen this submission stops being readable (Google Ads and LinkedIn keep it 90 days); null for Meta.
latest_submission_missing_reasonstring Nullablenot_capturedwhenlatest_submissionis null, otherwise null.Possible valuesnot_captured
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": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_attribution",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"original_capture": {
"capture": "at_creation",
"captured_at": "2026-09-28T10:15:00.000Z",
"source": "meta_lead_ads",
"source_hint": null,
"source_channel": null,
"external_provider": null,
"received_at": "2026-09-28T10:15:00.000Z",
"submitted_at": "2026-09-28T10:14:30.000Z",
"origin": null,
"campaign": {
"id": {
"value": "120210000000000101",
"provenance": "provider"
},
"name": {
"value": "Spring check-up",
"provenance": "provider"
}
},
"ad": {
"id": {
"value": "120210000000000303",
"provenance": "provider"
},
"name": {
"value": "Free first visit",
"provenance": "provider"
}
},
"ad_set": {
"id": {
"value": "120210000000000202",
"provenance": "provider"
},
"name": {
"value": "Families nearby",
"provenance": "provider"
}
},
"ad_group": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"form": {
"id": {
"value": "900000000000000404",
"provenance": "provider"
},
"name": {
"value": "Book a check-up",
"provenance": "provider"
}
},
"creative": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"asset_group": {
"id": {
"value": null,
"provenance": "not_captured"
}
},
"page": {
"id": {
"value": "100000000000000505",
"provenance": "provider"
},
"name": {
"value": "Example Dental",
"provenance": "provider"
}
},
"utm": null,
"click_network": {
"value": null,
"provenance": "not_captured"
},
"ad_referral": null,
"family_origin": null,
"audience": {
"value": null,
"missing_reason": "unsupported"
}
},
"original_capture_missing_reason": null,
"latest_submission": null,
"latest_submission_missing_reason": "not_captured",
"version": 1,
"updated_at": "2026-09-28T10:15:02.100Z"
}How the team has answered a lead across its conversations and calls: the latest messages each way and whether a reply is due. It uses its lead's id.
Attributes
idstring ID prefixlead_…Public id of the record.
objectstringAlways
lead_response.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team this record belongs to.
last_inbound_atstring Nullable Formatdate-timeThe latest message from the customer on any of the lead's conversations (UTC), or null. Not counted: erased messages, imported WhatsApp history and web-chat visitor turns. Instagram shares cannot be told apart and count.
last_outbound_atstring Nullable Formatdate-timeThe latest message sent to the customer that did not fail, on any of the lead's conversations and whoever sent it (UTC), or null. Imported WhatsApp history counts.
awaiting_replybooleanTrue when
last_inbound_atis newer than the latest reply on any of the lead's conversations. A reply is a sent message that did not fail and was recorded as a conversation reply or with no purpose; outreach, transactional messages (such as reminders) and imported history do not count. Most stored messages carry no purpose, so an automated send recorded without one also counts as a reply. False when the customer has never written.last_answered_call_atstring Nullable Formatdate-timeWhen the latest of the lead's calls whose
outcomeisanswered_humanoranswered_aistarted (UTC), or null. A connected outbound call on Totem's phone lines readsunknown, so it is not counted.last_whatsapp_delivery_statusstring Nullabledelivered,readorfailedfor the latest message sent to the lead on WhatsApp. Null when that message has no receipt yet (sentis never stored) or the lead has no message sent on WhatsApp.Possible valuesdeliveredreadfailed
coverageobjectWhat these facts were computed from.
conversationsinteger Range 0–20The lead's conversations these facts were computed from, newest first; at most 20.
callsinteger Range 0–50The lead's calls
last_answered_call_atwas computed from, newest first; at most 50.channels_without_delivery_dataArray<string>The channels of those conversations that store no delivery receipts (every channel but WhatsApp), sorted.
Possible valuessmsfacebookinstagramtiktokchatbotemail
truncatedbooleanTrue when a read limit was reached (20 conversations, 200 messages or 50 calls): older activity was not read, so a time can be null or older than the truth, and
awaiting_replycan miss an older reply.
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": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_response",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"last_inbound_at": "2026-10-01T08:58:00.000Z",
"last_outbound_at": "2026-10-01T08:59:30.000Z",
"awaiting_reply": false,
"last_answered_call_at": "2026-09-28T10:17:00.000Z",
"last_whatsapp_delivery_status": "read",
"coverage": {
"conversations": 2,
"calls": 1,
"channels_without_delivery_data": [
"email"
],
"truncated": false
},
"version": 7,
"updated_at": "2026-10-01T08:59:31.040Z"
}Lead note body.
Attributes
idstring ID prefixnote_…Public id of the record.
objectstringAlways
lead_note.livemodebooleantruefor real data;falsein example data.leadstring ID prefixlead_…The parent lead.
bodystring ≤ 50000 charsCRM note text; requires the explicit note-content grant.
created_atstring Formatdate-timeWhen this note was created.
external_idstring Nullable ≤ 200 charsThe caller’s own external id, or null. Canonical feed objects withhold all integration namespaces.
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": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"object": "lead_note",
"livemode": false,
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"body": "Requested an updated proposal for the appointment.",
"created_at": "2026-10-01T09:30:00.000Z",
"external_id": null,
"version": 1,
"updated_at": "2026-10-01T09:30:00.000Z"
}Lead note metadata without its content; safe for a write-only receipt or replay.
Attributes
idstring ID prefixnote_…≤ 256 charsOpaque stable note id, bound to this team and lead incarnation; never parse it.
objectstringAlways lead_note.
livemodebooleanTrue for real data; false only in fictional example data.
leadstring ID prefixlead_…The lead this note belongs to.
versioninteger Range ≥ 1The current note version; use the matching strong note ETag for conditional writes.
created_atstring Formatdate-timeWhen the note was created.
updated_atstring Formatdate-timeWhen the current version was recorded.
external_idstring Nullable ≤ 200 charsYour integration’s external id for this note, or null; other integrations’ ids are withheld.
{
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"object": "lead_note",
"livemode": false,
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"created_at": "2026-10-01T09:30:00.000Z",
"external_id": "crm-note-123",
"version": 1,
"updated_at": "2026-10-01T09:30:00.000Z"
}Custom values with a separate opaque ETag in the response header.
Attributes
objectstringAlways lead_custom_values.
leadstring ID prefixlead_…Owning lead.
valuesArray<object>Current exact-name values; requires the separate content-read grant.
namestring 1–100 charsExact stable field name; names are never inferred from labels.
labelstring ≤ 200 charsHuman-readable label.
valuestring ≤ 2000 charsExact string value; an empty string is a stored value, not deletion.
sourcestring May be absentStored provenance, when known.
Possible valuesformcall_extractionmanualcsv
{
"object": "lead_custom_values",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"values": [
{
"name": "boat_type",
"label": "Boat type",
"value": "Sailboat",
"source": "manual"
}
]
}Content-free mutation receipt; the response ETag reflects the current source even on replay.
Attributes
objectstringAlways lead_custom_values_receipt.
leadstring ID prefixlead_…Owning lead.
changedbooleanWhether this logical request changed stored custom values.
set_countinteger Range 0–50Exact names set by this logical request.
removed_countinteger Range 0–50Existing exact names removed by this logical request.
{
"object": "lead_custom_values_receipt",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"changed": true,
"set_count": 1,
"removed_count": 0
}One stage, status or assignee transition of a lead. Activities never change once written.
Attributes of every variant
idstring ID prefixact_…Public id of the record.
objectstringAlways
activity.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team the lead belongs to.
leadstring Nullable ID prefixlead_…The lead that moved. Null only while Totem has not yet assigned the lead its id.
occurred_atstring Formatdate-timeWhen the change was saved.
actor_kindstringWho made the change: a person, the AI, Totem automation, an API caller, or unknown. Totem knows who made a change only when the same save wrote the lead's status, so a stage or assignee change made on its own reads unknown.
Possible valueshumanaisystemapiunknown
stage_snapshotobject NullableThe stage the lead was in after the change (for "clear pipeline data", the stage it left), or null.
stagestring Nullable ID prefixstg_…The stage.
boardstring Nullable ID prefixbrd_…Its board, or null for a legacy stage without one.
namestring NullableThe stage name when the change was recorded, or null when the stage was already deleted.
value_snapshotnumber NullableThe estimated value at that moment, in major units, or null.
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.
Variants
Each Activity is exactly one of these 3 variants.
A status transition
When type is one of status_changed archived unarchived revived
typestringstatus_changed,archived,unarchived, orrevived(the contact came back on their own and reopened an archived lead).Possible valuesstatus_changedarchivedunarchivedrevived
fromstring NullableThe status before, or null when there was none.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
tostringThe status after.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
A stage move
When type is stage_changed
typestringAlways
stage_changed.fromobject NullableThe stage and board before, or null when the lead had neither.
stagestring Nullable ID prefixstg_…The stage.
boardstring Nullable ID prefixbrd_…The board, or null for a legacy stage without one.
toobjectThe stage and board after.
stagestring Nullable ID prefixstg_…The stage.
boardstring Nullable ID prefixbrd_…The board, or null for a legacy stage without one.
A change of assigned members
When type is assignees_changed
typestringAlways
assignees_changed.fromArray<string> ID prefixmem_…The assigned members before, sorted.
toArray<string> ID prefixmem_…The assigned members after, sorted.
{
"id": "act_aBgzeetVKDEjpAAkXfEFF53ZGd2ZMmGhUDKgagqLbh6c7R1GqOl0xsFw7pyRhD3SqqYWGMdb371xxj",
"object": "activity",
"livemode": false,
"type": "stage_changed",
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"occurred_at": "2026-09-28T10:20:00.000Z",
"actor_kind": "ai",
"stage_snapshot": {
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"name": "Contacted"
},
"value_snapshot": 1200,
"from": {
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
},
"to": {
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst"
},
"version": 1,
"updated_at": "2026-09-28T10:20:01.500Z"
}A board with its stages in pipeline order.
Attributes
idstring ID prefixbrd_…Public id of the record.
objectstringAlways
board.livemodebooleantruefor real data;falsein example data.teamstring ID prefixteam_…The team this record belongs to.
namestring Nullable ≥ 1 charsThe board's name, or null when none is stored.
is_defaultbooleanTrue for the team's default board, where new leads land unless routed elsewhere.
is_archivedbooleanTrue when the board is archived (hidden from the board selector). Its leads still export.
appointment_booked_stagestring Nullable ID prefixstg_…The stage of this board a lead moves to when its first appointment is confirmed, or null when none is set or it names no stage of this board.
stagesArray<object>The board's stages, ordered by position, then by id. A stage with no position stored at all is left out, although a lead can still name it.
objectstringAlways
stage.idstring ID prefixstg_…Public id of the stage; a lead's
stagenames it.namestring Nullable ≥ 1 charsThe stage's name, or null when none is stored.
positionnumber NullableThe stage's position on its board, left to right; null when the stored position is not a number. Stages are listed in this order.
is_defaultbooleanTrue for the stage new leads of this board enter.
is_finalbooleanTrue for a final stage: moving a lead here marks it converted.
is_archivebooleanTrue for an archive stage, whose leads are hidden from the main board view.
modestring NullableWho moves leads:
standard(people only),supervised(AI may move leads in, people move them out) orautomated(AI runs outreach and moves leads in and out); null for a value this version does not know.Possible valuesstandardsupervisedautomated
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": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"object": "board",
"livemode": false,
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"name": "New patients",
"is_default": true,
"is_archived": false,
"appointment_booked_stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
"stages": [
{
"object": "stage",
"id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVR3422Yg",
"name": "New",
"position": 0,
"is_default": true,
"is_final": false,
"is_archive": false,
"mode": "automated"
},
{
"object": "stage",
"id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"name": "Contacted",
"position": 1,
"is_default": false,
"is_final": false,
"is_archive": false,
"mode": "supervised"
},
{
"object": "stage",
"id": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVT1QpfZ5",
"name": "Visit booked",
"position": 2,
"is_default": false,
"is_final": true,
"is_archive": false,
"mode": "standard"
}
],
"version": 4,
"updated_at": "2026-09-02T16:40:00.000Z"
}Current source-bound CRM metadata and independently requested content. No export capture version or business authoring profile is included.
Attributes
objectstringAlways crm_context.
source_contactobjectCurrent source contact evidence, independently of whether the conversation is linked to a lead. A tenant without a signed source receives null phone.
phonestring Nullable ≤ 32 charsCurrent canonical transport phone from the authorized retained source, or null when hidden, cleared or unavailable; never an old sender fallback.
conversation_idstring Nullable ID prefixconv_…Current authorized execution conversation, or null for a lead-only tenant context; never an unrelated thread.
call_idstring Nullable ID prefixcall_…Current authorized voice call, or null when no call source exists. A browser session never invents a conversation or premature call.
Current authorized source lead, or null when this conversation is still unlinked.
teamobjectBounded team runtime facts; no assistant prompt or business profile.
namestring Nullable ≥ 1 charsThe team's name as it appears in Totem, or null when none is stored.
timezonestring ≥ 1 charsThe team's IANA time zone: its business-hours zone when that is valid, otherwise its default country's (Europe/Madrid when neither is set). Interpret the team's local times with it.
default_countrystring Nullable Pattern^[A-Z]{2}$The team's default country (ISO 3166-1 alpha-2), which Totem uses when someone types a phone number without a prefix; null when none is set. The API does not apply it:
Lead.phoneis validated without a default country, so a number stored without its country prefix readsphone_status: invalid.idstring ID prefixteam_…Authorized team.
extra_infostring Nullable ≤ 2000 charsThe team’s short runtime extra information, never its authoring business profile.
business_hours_sourcestringWhether the week is configured or uses the normal Monday–Friday 09:00–18:00 fallback.
Possible valuesconfigureddefault
business_hoursobjectCurrent canonical opening week in the team’s time zone.
mondayArray<object>Monday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
tuesdayArray<object>Tuesday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
wednesdayArray<object>Wednesday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
thursdayArray<object>Thursday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
fridayArray<object>Friday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
saturdayArray<object>Saturday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
sundayArray<object>Sunday opening intervals; an empty list means closed.
startstringOpening time on the business wall clock (HH:mm).
endstringClosing time on the business wall clock (HH:mm; 24:00 means midnight).
now_businessstringSnapshot time rendered on the business clock with its actual UTC offset.
notesArray<object> Nullable ≤ 20 itemsUp to twenty current retained notes when explicitly requested and authorized; otherwise null.
leadstring ID prefixlead_…The parent lead.
bodystring ≤ 50000 charsCRM note text; requires the explicit note-content grant.
created_atstring Formatdate-timeWhen this note was created.
external_idstring Nullable ≤ 200 charsThe caller’s own external id, or null. Canonical feed objects withhold all integration namespaces.
notes_has_morebooleanMore notes exist beyond this bounded context; use the separately authorized notes endpoint for a full export.
custom_valuesArray<object> NullableCurrent custom values only when requested with their independent content permission; otherwise null.
namestring 1–100 charsExact stable field name; names are never inferred from labels.
labelstring ≤ 200 charsHuman-readable label.
valuestring ≤ 2000 charsExact string value; an empty string is a stored value, not deletion.
sourcestring May be absentStored provenance, when known.
Possible valuesformcall_extractionmanualcsv
automationobject NullableCurrent CRM automation metadata, separate from permission and consent.
flagsobjectCurrent effective automation flags, including durable holds.
archivedbooleanCurrent recorded operational flag.
pausedbooleanCurrent recorded operational flag.
needs_human_attentionbooleanCurrent recorded operational flag.
holdobject NullableCanonical hold reason and time; private appointment ids are withheld.
reasonstringCanonical durable hold reason.
sincenumberRecorded hold start in epoch milliseconds.
stateobjectCurrent source state only; it never authorizes or schedules outreach.
roundnumber NullableCurrent recorded number, or null when unknown.
currentStepnumber NullableCurrent recorded number, or null when unknown.
stepEnteredAtnumber NullableCurrent recorded number, or null when unknown.
roundExhaustedAtnumber NullableCurrent recorded number, or null when unknown.
completedAtnumber NullableCurrent recorded number, or null when unknown.
completionReasonstring NullableCurrent stored text, or null when unavailable.
scheduledContactAtnumber NullableCurrent recorded number, or null when unknown.
scheduledContactTypestring NullableCurrent stored text, or null when unavailable.
scheduledContactNotestring NullableCurrent stored text, or null when unavailable.
coolOffUntilnumber NullableCurrent recorded number, or null when unknown.
contactCountnumber NullableCurrent recorded number, or null when unknown.
hasBeenReachedbooleanCurrent recorded operational flag.
contact_limitsobjectExisting effective canonical safety limits; unknown malformed stored values remain null.
maxContactsPerLeadPerDaynumber NullableCurrent recorded number, or null when unknown.
maxTotalContactsPerLeadnumber NullableCurrent recorded number, or null when unknown.
coolOffPeriodDaysnumber NullableCurrent recorded number, or null when unknown.
maxReactivationRoundsnumber NullableCurrent recorded number, or null when unknown.
maxCallAttemptsPerStepnumber May be absent NullableCurrent recorded number, or null when unknown.
pipelineobject NullableCurrent authorized pipeline facts; opaque ids can be used with the public business operations.
stageobject NullableCurrent stage, including archived history.
idstring ID prefixstg_…Current opaque stage id.
namestring NullableCurrent stored text, or null when unavailable.
modestring NullableCurrent stored text, or null when unavailable.
positionnumber NullableCurrent recorded number, or null when unknown.
is_defaultbooleanCurrent recorded operational flag.
is_finalbooleanCurrent recorded operational flag.
is_archivebooleanCurrent recorded operational flag.
contextstring NullableCurrent stored text, or null when unavailable.
boardobject NullableCurrent board metadata with canonical stage selection.
idstring ID prefixbrd_…Current opaque board.
namestring NullableCurrent stored text, or null when unavailable.
typestring NullableCurrent stored text, or null when unavailable.
is_archivedbooleanCurrent recorded operational flag.
goalstring NullableCurrent stored text, or null when unavailable.
extra_infostring NullableCurrent stored text, or null when unavailable.
stagesArray<object> ≤ 40 itemsCurrent non-archive destination stages.
idstring ID prefixstg_…Current opaque stage id.
namestring NullableCurrent stored text, or null when unavailable.
modestring NullableCurrent stored text, or null when unavailable.
positionnumber NullableCurrent recorded number, or null when unknown.
is_defaultbooleanCurrent recorded operational flag.
is_finalbooleanCurrent recorded operational flag.
is_archivebooleanCurrent recorded operational flag.
contextstring NullableCurrent stored text, or null when unavailable.
routingobject NullableOnly the destinations currently allowed by the product’s one-time conversation routing policy.
instructionstringCanonical one-time routing instruction.
currentBoardNamestring NullableCurrent stored text, or null when unavailable.
boardsArray<object> ≤ 12 itemsCurrent permitted alternative boards.
idstring ID prefixbrd_…Allowed opaque board destination.
namestring NullableCurrent stored text, or null when unavailable.
descriptionstring NullableCurrent stored text, or null when unavailable.
goalstring NullableCurrent stored text, or null when unavailable.
stagesArray<object> ≤ 15 itemsSelectable destinations from the canonical routing policy.
idstring ID prefixstg_…Allowed opaque routing destination.
namestring NullableCurrent stored text, or null when unavailable.
entrybooleanCurrent recorded operational flag.
membersArray<object> ≤ 1000 itemsCurrent active own-team roster, without email addresses or raw user ids.
idstring ID prefixmem_…Opaque active team member.
display_namestring NullableCurrent stored text, or null when unavailable.
cadenceobject NullableActual safe effective timing and section metadata, or null without a current board.
sectionsArray<object> ≤ 4 itemsThe four actual effective runtime sections.
namestringCanonical runtime sequence.
Possible valuesmainreactivationfollowUpstageEntry
sourcestringActual inherited configuration source.
Possible valuesstageboardmain_fallbacknone
step_countnumber NullableCurrent recorded number, or null when unknown.
stepsArray<object> ≤ 20 itemsBounded timing/channel description; no template, account or provider ids.
indexinteger Range ≥ 0Zero-based effective sequence position.
channelstringBusiness channel only; provider and sender selectors are withheld.
Possible valuescallwhatsappemailunknown
delay_minutesnumber NullableCurrent recorded number, or null when unknown.
has_morebooleanCurrent recorded operational flag.
conversation_stale_hoursnumber NullableCurrent recorded number, or null when unknown.
stage_entry_delay_minutesnumber NullableCurrent recorded number, or null when unknown.
bypass_business_hoursbooleanCurrent recorded operational flag.
runtimeobjectNamed current operational language, routing and verified legal/privacy facts; no destination members or authoring profile.
preferred_languagestringCanonical operational team language.
notification_language_instructionstringExisting instruction for internal team notification language.
notification_departmentsArray<object>Current usable routing directory, without recipient identities.
idstringSaved natural department routing key, not a credential or member id.
namestringCurrent department name.
descriptionstringAuthored department responsibility description.
default_department_idstring NullableSaved default department key, or null.
notifications_enabledbooleanWhether the current business routing configuration is enabled.
controller_namestring NullableVerified current legal controller name, including canonical organization inheritance.
privacy_policy_urlstring NullableCurrent effective privacy disclosure URL, or null when none is published.
family_routingobject May be absent NullableCurrent configured organization routing only with the separately issued handoff capability; omitted for older or context-only grants.
instructionstring NullableCurrent stored text, or null when unavailable.
officesArray<object> ≤ 50 itemsBounded current configured organization directory, disclosed only with the independently issued handoff capability.
officestringExact current configured office slug.
namestring NullableCurrent stored text, or null when unavailable.
coveragestring NullableCurrent stored text, or null when unavailable.
preferred_languagestring NullableCurrent stored text, or null when unavailable.
boardsArray<object> ≤ 100 itemsCurrent configured eligible destination boards; no raw board or team ids.
idstring ID prefixbrd_…Opaque eligible configured board, usable only with the organization handoff action.
namestring NullableCurrent stored text, or null when unavailable.
is_defaultbooleanCurrent recorded operational flag.
Explicitly granted exact current conversation messages, or null when not requested/unavailable.
callsArray<object> Nullable ≤ 10 itemsExplicitly granted current lead call evidence, or null when not requested/unavailable.
idstring ID prefixcall_…Opaque current call incarnation.
directionstring NullableRecorded call direction.
Possible valuesinboundoutbound
started_atstring Nullable Formatdate-timeCurrent call start time, or null when unknown.
outcomestringCanonical transport outcome; distinct from the model snapshot’s business contact-log outcome.
Possible valuesanswered_humananswered_aivoicemailno_answerbusyfailedunknown
summarystring Nullable ≤ 2000 charsExplicitly granted bounded stored call summary.
sentimentstring Nullable ≤ 120 charsExplicitly granted stored call sentiment, when present.
transcriptstring Nullable ≤ 16000 charsExplicitly granted stored transcript text, when present.
transcript_truncatedbooleanWhether the stored transcript exceeds this bounded view.
paymentsobject NullableExplicitly granted canonical customer payment evidence. Opaque display ids never authorize an action; incomplete never means unpaid.
completebooleanWhether the canonical merchant reader proved complete history.
checkedAtnumber NullableCurrent recorded number, or null when unknown.
itemsArray<object> ≤ 5 itemsAt most five canonical current customer payment evidence items.
idstring Pattern^payment_[a-f0-9]{64}$Opaque display-only evidence digest; never a selector or capability.
statusstringCanonical financial evidence status.
Possible valuespaidpendingprocessingfailedexpiredcancelledrefundedpartially_refundedreview
amountMinorinteger Range ≥ 0Expected amount in minor currency units.
amountReceivedMinorinteger Range ≥ 0Actually received amount in minor currency units.
refundedAmountMinorinteger Nullable Range ≥ 0Known refunded amount in minor units, or null when unknown.
currencystring Pattern^[a-z]{3}$Lowercase three-letter currency code.
createdAtnumber NullableCurrent recorded number, or null when unknown.
descriptionstring NullableCurrent stored text, or null when unavailable.
referencestring NullableOpaque booking-payment reference when present; no provider id.
livemodebooleanTrue only for real merchant evidence; test data is never live proof.
verificationstringWhether this evidence was checked against Stripe or is stored-only.
Possible valuesstripestored
checkedAtnumber NullableCurrent recorded number, or null when unknown.
appointmentStatusstring NullableCurrent stored text, or null when unavailable.
amountHumanstring May be absentCanonical human-readable amount, when supplied.
createdAtHumanstring May be absentCanonical human-readable date, when supplied.
holded_recordsobject May be absentOnly records explicitly shared with this verified customer. No Holded contact ID, internal case notes or attachments.
statusstringOutcome of the customer consultation.
Possible valuesverification_requirednot_verifiedunavailableok
estimatesobject NullableThe verified customer’s approved quotes, when available.
itemsArray<object> ≤ 5 itemsUp to five recent approved quotes.
referencestring 1–100 charsQuote number visible to the customer.
statusstringCurrent quote status.
Possible valuespendingacceptedpartialcancelledrejectedoverdue
datestring Nullable Pattern^\d{4}-\d{2}-\d{2}$Issue date when available.
validUntilstring Nullable Pattern^\d{4}-\d{2}-\d{2}$Expiry date when available.
totalstring Nullable ≤ 24 charsTotal as a decimal string when available.
currencystring Nullable 3 charsCurrency code when available.
completebooleanWhether the quote list is complete.
casesArray<object> Nullable ≤ 5 itemsCases shared with the verified customer, when available.
kindstringType of case shared by the team.
Possible valuesprojectopportunity
referencestring Nullable 1–100 charsCase reference when available.
titlestring Nullable 1–100 charsCase name when available.
statusstring NullableKnown case status, or null if not available for this record.
Possible valuesarchivedopenwonlost
casesCompletebooleanWhether every shared case could be read.
coverageobjectExplicit coverage for every independently authorized content section.
notesobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
custom_valuesobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
messagesobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
callsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
paymentsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
recordingsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
attachmentsobjectCoverage of this exact requested section; unavailable is never an empty history.
statusstringWhether this requested section is complete, bounded or unavailable.
Possible valuesnot_requestedcompletepartialunavailable
includedinteger Range ≥ 0Number of authorized items actually included.
totalinteger Nullable Range ≥ 0Known complete total, or null when the read cannot prove it.
reasonstring NullableClosed operational coverage explanation, or null.
model_contextobject NullableOptional canonical model-facing projections with the existing sanitizer and exact total budgets; typed context remains separate.
context_jsonstring ≤ 20000 charsJSON serialized only after the canonical model projector and total content budget.
lead_automation_jsonstring Nullable ≤ 8000 charsCanonical lean automation JSON, or null without a current lead.
{
"object": "crm_context",
"source_contact": {
"phone": null
},
"conversation_id": null,
"call_id": null,
"lead": null,
"team": {
"name": "Example Dental",
"timezone": "Europe/Madrid",
"default_country": "ES",
"id": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"extra_info": null,
"business_hours_source": "configured",
"business_hours": {
"monday": [
{
"start": "09:00",
"end": "18:00"
}
],
"tuesday": [
{
"start": "09:00",
"end": "18:00"
}
],
"wednesday": [
{
"start": "09:00",
"end": "18:00"
}
],
"thursday": [
{
"start": "09:00",
"end": "18:00"
}
],
"friday": [
{
"start": "09:00",
"end": "18:00"
}
],
"saturday": [],
"sunday": []
},
"now_business": "2026-10-01T11:30:00+02:00"
},
"notes": null,
"notes_has_more": false,
"custom_values": null,
"automation": null,
"pipeline": null,
"runtime": {
"preferred_language": "en",
"notification_language_instruction": "Use English.",
"notification_departments": [],
"default_department_id": null,
"notifications_enabled": false,
"controller_name": null,
"privacy_policy_url": null
},
"messages": null,
"calls": null,
"payments": null,
"coverage": {
"notes": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"custom_values": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"messages": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"calls": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"payments": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"recordings": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
},
"attachments": {
"status": "not_requested",
"included": 0,
"total": null,
"reason": null
}
},
"model_context": null
}Current canonical CRM lead projection, available through the explicit operational context permission without inventing a capture version.
Attributes
teamstring ID prefixteam_…The team the record belongs to.
record_kindstringleadwhen the record has a pipeline status, otherwiseclient. A lead whose status this version does not know readsstatus: null.Possible valuesleadclient
namestring NullableFirst name or display name, or null.
surnamestring NullableSurname, or null.
date_of_birthstring Nullable FormatdatePattern^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Civil date of birth in YYYY-MM-DD, without a time or timezone; null when missing, cleared or invalid.
emailstring NullableEmail address as stored, or null.
companystring NullableCompany, or null.
websitestring NullableContact website as stored, without fetching it, or null.
phonestring NullablePhone in E.164, only when the stored number validates; otherwise null.
phone_statusstringvalid(seephone),invalid(a number is stored but does not validate, for example one stored without its country prefix) ormissing.Possible valuesvalidinvalidmissing
statusstring NullablePipeline status; null for a client record, or for a status this version does not know.
convertedis not "won".Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
status_set_bystring NullableWho set the current status: a person, the AI, Totem automation, an API caller, or unknown (no recorded transition lands on it). Null when
statusis null.Possible valueshumanaisystemapiunknown
archive_reasonstring NullableWhy the record was archived, as a closed code; stored free text is
other. Null when none is stored.Possible valuesopt_outno_consentnot_interestednot_qualifiedno_contactmergedfamily_transferother
archived_from_statusstring NullableThe status the lead had before its current archive; null while it is not archived or when unknown.
Possible valuesnewcontactedqualifiednegotiatingconvertedlostarchivedunreachable
contact_permissionsobjectContact permissions. Apply them before any outreach from your own systems.
do_not_contactbooleanTrue when the person asked never to be contacted (the
opt_outarchive reason). Stop every channel.email_opt_outbooleanTrue when the person unsubscribed from marketing and follow-up email.
email_opt_out_atstring Nullable Formatdate-timeWhen the email opt-out was recorded, or null.
whatsapp_consentboolean NullableWhatsApp consent: false when refused, true when recorded, null when unknown.
provenanceobjectThe source of each permission.
do_not_contactstring NullableWhere
do_not_contactcomes from, or null when it is false.Possible valuesarchive_reason
email_opt_outstring NullableWho recorded the email opt-out: the unsubscribe link, a person in Totem, or unknown. Null when there is none.
Possible valuesunsubscribe_linkmanualunknown
whatsapp_consentstring Nullablearchive_reasonwhen a refusal is recorded as the archive reason;storedfor the value kept on the record, which team members can edit. Null when unknown.Possible valuesstoredarchive_reason
merged_intostring Nullable ID prefixlead_…The lead this record was merged into, or null (also when that lead no longer exists).
transferred_toobject NullableWhere a transfer to another team of your organization sent this lead, or null. The team may be one your key does not read.
teamstring ID prefixteam_…The destination team.
leadstring Nullable ID prefixlead_…The destination lead, or null when its id cannot be named across teams: an assistant handoff created it, or the transfer landed on an existing lead-ads lead (Meta, Google Ads or LinkedIn) or another lead with a fixed id.
revived_atstring Nullable Formatdate-timeWhen the contact last came back on their own and revived an archived lead, or null.
pipeline_clearedbooleanTrue when the lead was converted with "clear pipeline data": board, stage, priority, assignees, estimated value and the source fields other than
source_channelare null because they were cleared.converted_atstring Nullable Formatdate-timeWhen the lead was converted, while its status is
converted; otherwise null.value_at_conversionnumber NullableThe estimated value when it was converted, in major units. Survives "clear pipeline data".
prioritystring NullablePriority, or null.
Possible valueslowmediumhighurgent
tagsArray<string>Labels as stored.
leadandbookingare system labels.boardstring Nullable ID prefixbrd_…The board, resolved through the stage when it has one; or null.
stagestring Nullable ID prefixstg_…The stage, or null.
assigneesArray<string> Nullable ID prefixmem_…Assigned members, sorted. Null when the record has no pipeline data.
estimated_valuenumber NullableEstimated value in major units as stored (decimals allowed), or null.
estimated_value_currencynull NullableAlways null: Totem stores no currency with the value.
sourcestring NullableThe stored lead source;
apialso covers leads created by Totem itself (for example from a conversation or a call), seesource_detail. Null when none is stored.Possible valuesmeta_lead_adsmanualwebsite_formbooking_pagecsv_importapichatbotgoogle_adslinkedinother
source_channelstring NullableThe channel the record started on (for example
whatsapp,phone,widget), or null. Team members can edit it.source_detailstring Nullableconversation,call,external:<provider>,gated_ad:<source>,family_handoff,api_intakeorunknown; null whensourceneeds no detail.source_provenancestring Nullableserver_writtenwhen Totem set the source from what the ad platform reported; otherwisemember_editable(team members can change it). Null withsource.Possible valuesserver_writtenmember_editable
created_atstring Formatdate-timeWhen the record was created.
idstring ID prefixlead_…Opaque current lead id, scoped to the authorized team and incarnation.
etagstring Pattern^"lrs1_[a-f0-9]{64}"$Strong ETag of the exact retained lead source shown here; never an export capture version.
updated_atstring Formatdate-timeActual source update time of this retained snapshot.
objectstringAlways lead_source; this is not a captured Lead version.
{
"team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
"record_kind": "lead",
"name": "Alex",
"surname": "Rivera",
"date_of_birth": "1990-04-23",
"email": "alex.rivera@example.com",
"company": "Example Dental",
"website": null,
"phone": "+12025550123",
"phone_status": "valid",
"status": "contacted",
"status_set_by": "ai",
"archive_reason": null,
"archived_from_status": null,
"contact_permissions": {
"do_not_contact": false,
"email_opt_out": false,
"email_opt_out_at": null,
"whatsapp_consent": null,
"provenance": {
"do_not_contact": null,
"email_opt_out": null,
"whatsapp_consent": null
}
},
"merged_into": null,
"transferred_to": null,
"revived_at": null,
"pipeline_cleared": false,
"converted_at": null,
"value_at_conversion": null,
"priority": "high",
"tags": [
"spring-check-up"
],
"board": "brd_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMX3trzsVUZQuHcMSuDh1aRIst",
"stage": "stg_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXWBYWcKwVTY3CRZlVS3oYvs0",
"assignees": [
"mem_h548E7UiYhutHhucVrQCzkM0eaea0"
],
"estimated_value": 1200,
"estimated_value_currency": null,
"source": "meta_lead_ads",
"source_channel": null,
"source_detail": null,
"source_provenance": "member_editable",
"created_at": "2026-09-28T10:15:00.000Z",
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"etag": "\"lrs1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z",
"object": "lead_source"
}Write receipt metadata only: no contact details or CRM content.
Attributes
idstring ID prefixlead_…Opaque current lead id, scoped to the authorized team and incarnation.
etagstring Pattern^"lrs1_[a-f0-9]{64}"$Strong ETag of the exact retained lead source shown here; never an export capture version.
updated_atstring Formatdate-timeActual source update time of this retained snapshot.
objectstringAlways lead_source_receipt.
{
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"etag": "\"lrs1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z",
"object": "lead_source_receipt"
}Source-backed CRM mutation metadata. It never invents an inventory version or grants read access through a write.
Attributes
objectstringAlways lead_source_mutation.
createdbooleanTrue only when this operation created the retained lead.
changedbooleanWhether the source values changed; an inert repeat is false.
registered_lead_linkedboolean May be absentFor voice registration, whether the genuinely created contact was linked to this execution. A different stated contact stays held and grants no subsequent source access.
Current authorized source receipt, or null when an unverified duplicate must remain unlinked.
{
"object": "lead_source_mutation",
"created": false,
"changed": true,
"lead": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"etag": "\"lrs1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z",
"object": "lead_source_receipt"
}
}Current retained note content under its independent read grant, without an inventory version.
Attributes
leadstring ID prefixlead_…Current authorized parent lead.
bodystring ≤ 50000 charsCRM note text; requires the explicit note-content grant.
created_atstring Formatdate-timeWhen this note was created.
external_idstring Nullable ≤ 200 charsThe caller’s own external id, or null. Canonical feed objects withhold all integration namespaces.
idstring ID prefixnote_…Opaque id of this exact note incarnation.
objectstringAlways lead_note_source.
etagstring Pattern^"lns1_[a-f0-9]{64}"$Strong validator bound to the current note and parent lead incarnations and source values.
updated_atstring Formatdate-timeActual source update time of this note.
{
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"body": "Requested the service guide.",
"created_at": "2026-10-01T09:30:00.000Z",
"external_id": null,
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"object": "lead_note_source",
"etag": "\"lns1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z"
}Metadata-only source write receipt; no note text or other notes.
Attributes
idstring ID prefixnote_…Opaque id of this exact note incarnation.
leadstring ID prefixlead_…Current authorized parent lead.
objectstringAlways lead_note_source_receipt.
etagstring Pattern^"lns1_[a-f0-9]{64}"$Strong validator bound to the current note and parent lead incarnations and source values.
updated_atstring Formatdate-timeActual current source update time.
{
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_note_source_receipt",
"etag": "\"lns1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z"
}Content-free proof that this operation deleted the reviewed note incarnation.
Attributes
idstring ID prefixnote_…Opaque id of this exact note incarnation.
leadstring ID prefixlead_…Current authorized parent lead.
objectstringAlways lead_note_source_deletion; it names the deleted incarnation only.
{
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_note_source_deletion"
}Current source note mutation metadata; safe for write-only integrations and replay.
Attributes
objectstringAlways lead_note_source_mutation.
createdbooleanWhether this logical operation created the note.
deletedbooleanWhether this operation deleted its reviewed note incarnation.
Live source metadata or the deleted note identity, never content.
{
"object": "lead_note_source_mutation",
"created": false,
"deleted": false,
"note": {
"id": "note_m3S3yY53i0GJwNn0UPsl4jp3BubIW",
"lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"object": "lead_note_source_receipt",
"etag": "\"lns1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z"
}
}Metadata of a persisted callback promise, without customer contact details or provider selectors.
Attributes
objectstringAlways scheduled_contact_receipt.
leadLeadSourceReceiptcontact_atstring Formatdate-timeThe time committed to the existing delayed-contact dispatcher.
channelstringCommitted contact channel. This receipt does not claim provider delivery.
Possible valuescallwhatsapp
createdbooleanWhether this operation genuinely created the contact.
{
"object": "scheduled_contact_receipt",
"lead": {
"id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
"etag": "\"lrs1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"",
"updated_at": "2026-10-01T09:30:00.000Z",
"object": "lead_source_receipt"
},
"contact_at": "2026-10-02T09:30:00.000Z",
"channel": "call",
"created": false
}Content-free organization handoff result; destination contacts, source content and provider selectors remain private.
Attributes
objectstringAlways family_handoff_receipt.
statusstringCanonical accepted disposition, or identity ambiguity awaiting human review.
Possible valuesacceptedneeds_review
officestringConfigured receiving office slug; no internal destination team id.
moved_sourcebooleanWhether the canonical source lead was transferred, preserving pending-work fences.
notification_queuedbooleanTrue only when the canonical notification and push outbox were committed. This does not claim delivery.
{
"object": "family_handoff_receipt",
"status": "accepted",
"office": "example",
"moved_source": false,
"notification_queued": true
}Content-free receipt with no destination existence or identity disclosure.
Attributes
objectstringAlways referral_receipt.
statusstringSubmission received. Unverified duplicates are acknowledged neutrally without changing or identifying an existing contact. This does not claim approval, outreach or provider delivery.
{
"object": "referral_receipt",
"status": "received"
}Content-free quote outcome receipt; no customer, provider, stage or private effect selectors.
Attributes
objectstringAlways quote_outcome_receipt.
statusstringCanonical commercial disposition was recorded. This does not claim independent verification of the external quote or delivery.
delivery_evidencestringExternal delivery evidence was attested by the caller.
Valuecaller_attested
{
"object": "quote_outcome_receipt",
"status": "recorded",
"delivery_evidence": "caller_attested"
}