Skip to content
v1

Reference Calls

Calls

List and fetch a team's calls, with their direction, timing and a normalized outcome. Separate permissions control transcripts, recordings and outgoing calls.

Overview

A call is the metadata of a phone call, or of a web voice session, linked to a lead: its direction, when it started, how long it lasted, and how it ended. The list and detail metadata endpoints exclude recordings, transcripts and summaries; separately authorized content endpoints are described below. A business notification can include a source summary already copied into its alert text. The caller's name and number travel on the linked lead, not on the call.

outcome says how the call ended: answered_human, answered_ai, voicemail, no_answer, busy, failed, or unknown when the call is still live or nothing shows who answered. Read it together with outcome_basis, which names the evidence behind it:

outcome_basisThe outcome rests on
inbound_verdictTotem's classification of an inbound call.
ai_analysisTotem's classification of the status, end reason and length that Retell reports.
duration_floorThe length of a call on a human line: one of at least 10 seconds counts as answered.
carrier_answer_onlyOnly the carrier's answer signal. It never counts as answered, so a connected call reads unknown.
browser_sessionA web voice session with the assistant.
noneNo evidence.

Which basis a call gets depends on how it was placed. Inbound calls on Totem's phone lines get inbound_verdict, or carrier_answer_only when Totem has not classified them. Every outbound call on Totem's phone lines, whether the AI or a person made it, gets carrier_answer_only, so a connected outbound call reads unknown. Calls handled through the Retell voice platform get ai_analysis, and calls on a connected Zadarma PBX get duration_floor. A web voice session gets browser_session, and a call that is still live gets none. A lead's last_answered_call_at counts only answered_human and answered_ai, so it leaves out connected outbound calls on Totem's phone lines.

duration_seconds is rounded down to whole seconds, and is null while the call is still live. lead is null when the call is not linked to a lead, or when the lead no longer exists.

Use GET /v1/calls and GET /v1/calls/{id} to look calls up; GET /v1/calls?lead= lists one lead's calls. To keep a copy, follow the changes feed, which delivers every new call and every change: Keep a copy in sync explains it.

Outgoing calls and retained content

Discover a current calling selection with POST /v1/calls/options, then explicitly confirm the chosen outgoing call with POST /v1/calls. The server checks the current lead, recipient policy, published assistant and line again before execution. A returned operation is pending work; provider acceptance is not proof that the person answered.

GET /v1/calls/{id}/transcript and GET /v1/calls/{id}/recording require their separate current content permissions. Transcripts contain speech without tool arguments or results. Recording URLs expire and expose only the authorized retained recording. A metadata read permission does not grant either content class. PATCH /v1/calls/{id}/analysis is reserved for the authorized system analysis of the exact dispatched call; an ordinary integration cannot submit arbitrary analysis verdicts.

Read current outgoing call options

POST /v1/calls/options

Returns bounded current published assistant and outgoing line selections for the owned lead, under current consent and contact policy. This read places no call. Choose one opaque binding explicitly; no provider or account credentials are exported.

Scopes
calls:write
Rate limit
Read

Headers

  • Totem-Team string Conditional ID prefix team_…

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

Request body

Read currently published calling bindings for this current lead without placing a call.

  • lead_id string Required ID prefix lead_…

    Current retained lead in the selected team.

Returns

Returns a CallBindingOptions object.

Errors

+ 12 common errors

POST /v1/calls/options
# Fictional fixtures: replace references and dates with current API values.
# Send consent or confirmation attestations only after the person confirms.
curl -X POST 'https://api.totemstudio.ai/v1/calls/options' \
  -H "Authorization: Bearer $TOTEM_API_KEY" \
  -H "Totem-Team: $TOTEM_TEAM_ID" \
  -H "Content-Type: application/json" \
  --data '{"lead_id": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG"}'
Response · 200JSON
{
  "object": "call_binding_options",
  "data": [
    {
      "object": "call_binding",
      "reference": "tcall1.cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
      "assistant_name": "Example assistant",
      "line_label": "Example office",
      "line_number": "+12025550123",
      "channel": "phone"
    }
  ],
  "complete": true
}

List calls

GET /v1/calls

Returns a page of the team's calls, each with its direction, start time, duration and a normalized outcome, and linked to its lead when there is one. Pass lead for one lead's calls. Recordings and transcripts are not exported.

Scopes
calls:read
Rate limit
Sync

Query parameters

  • limit integer Range 1–100 Default 25

    Items per page, 1–100. Defaults to 25.

  • cursor string 1–512 chars

    The next_cursor of the previous page. Omit it for the first page.

  • lead string ID prefix lead_…

    Only the calls linked to this lead: every item's lead is this id. A lead of another team, or one that does not exist, matches nothing.

Headers

  • Totem-Team string Conditional ID prefix team_…

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

Returns

Returns a list of Call objects.

  • object string

    Always list.

  • data Array<Call>

    The items of this page.

  • has_more boolean

    true when another page follows: fetch it with next_cursor, even if this page holds fewer items than limit.

  • next_cursor string Nullable

    Opaque cursor for the next page, or null on the last page. Never parse it.

Errors

+ 12 common errors

GET /v1/calls
curl 'https://api.totemstudio.ai/v1/calls?limit=25' \
  -H "Authorization: Bearer $TOTEM_API_KEY" \
  -H "Totem-Team: $TOTEM_TEAM_ID"
Response · 200JSON
{
  "object": "list",
  "data": [
    {
      "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
      "object": "call",
      "livemode": false,
      "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
      "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
      "direction": "inbound",
      "started_at": "2026-09-28T10:17:00.000Z",
      "duration_seconds": 184,
      "outcome": "answered_ai",
      "outcome_basis": "inbound_verdict",
      "version": 2,
      "updated_at": "2026-09-28T10:21:04.010Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Start an approved outgoing call

POST /v1/calls

Accepts one durable call intent using the current lead contact and a binding returned by calls.options. The canonical engine rechecks assistant, line, consent, opt-out, contact limits and budget before provider effects. The receipt confirms provider acceptance without claiming an answer or completed call; reuse Idempotency-Key after uncertainty and never repeat outcome_unknown.

Scopes
calls:write
Rate limit
write

Headers

  • Totem-Team string Conditional ID prefix team_…

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

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

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

Request body

Start one durable outgoing call to the current lead through a reviewed current binding.

  • lead_id string Required ID prefix lead_…

    Current retained lead in the selected team.

  • binding_reference string Required 40–16384 chars Pattern ^tcall1\.[A-Za-z0-9_-]+$

    Opaque current calling binding emitted by the server. Never parse, edit or substitute its contents.

  • consent_confirmed boolean Required

    Explicit caller attestation that this outgoing call was approved. Existing recipient consent, opt-out and contact limits remain required.

    Value
    • true
  • objective string ≤ 4000 chars

    Optional bounded objective for this call. It does not change the published assistant instructions or contact policy.

Returns

Returns an Operation object.

Errors

+ 12 common errors

POST /v1/calls
# 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/calls' \
  -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", "binding_reference": "tcall1.cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", "consent_confirmed": true}'
Response · 202JSON
{
  "object": "operation",
  "id": "op_m3yGe1tkVy6hn3m9LH9m7e640wg0O",
  "status": "queued",
  "endpoint": "calls.start",
  "created_at": "2026-10-01T09:30:00.000Z",
  "updated_at": "2026-10-01T09:30:00.000Z",
  "result": null,
  "error": null
}

Get a call

GET /v1/calls/{id}

Returns one call by its id. A call this key cannot read, or one that was removed, answers 404 resource_missing.

Scopes
calls:read
Rate limit
Read

Path parameters

  • id string Required ID prefix call_…

    The call's public id.

Returns

Returns a Call object.

Errors

+ 12 common errors

GET /v1/calls/{id}
curl 'https://api.totemstudio.ai/v1/calls/call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk' \
  -H "Authorization: Bearer $TOTEM_API_KEY"
Response · 200JSON
{
  "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
  "object": "call",
  "livemode": false,
  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
  "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
  "direction": "inbound",
  "started_at": "2026-09-28T10:17:00.000Z",
  "duration_seconds": 184,
  "outcome": "answered_ai",
  "outcome_basis": "inbound_verdict",
  "version": 2,
  "updated_at": "2026-09-28T10:21:04.010Z"
}

Read authorized retained call speech

GET /v1/calls/{id}/transcript

Reads bounded retained speech under the independent transcript grant and current team communication-sharing policy; tool arguments and private transport metadata are excluded. The call, current linked lead, erasure fence and exact retained incarnation are rechecked, with complete:false when truncated. Call metadata permission alone grants no transcript content.

Scopes
calls:transcripts:read
Rate limit
Read

Path parameters

  • id string Required ID prefix call_…

    The call's public id.

Returns

Returns a CallTranscript object.

Errors

+ 12 common errors

GET /v1/calls/{id}/transcript
curl 'https://api.totemstudio.ai/v1/calls/call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk/transcript' \
  -H "Authorization: Bearer $TOTEM_API_KEY"
Response · 200JSON
{
  "object": "call_transcript",
  "call_id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
  "text": "Please send the service guide.",
  "complete": true
}

Resolve an authorized retained call recording

GET /v1/calls/{id}/recording

Returns a short-lived URL for the current owned application recording stored in the supported European bucket, after fresh recording content grant, current sharing and exact source checks. It does not fetch provider URLs, import recordings or grant general storage access. A missing retained application artifact returns resource_missing.

Scopes
calls:recordings:read
Rate limit
Read

Path parameters

  • id string Required ID prefix call_…

    The call's public id.

Returns

Returns a CallRecording object.

Errors

+ 12 common errors

GET /v1/calls/{id}/recording
curl 'https://api.totemstudio.ai/v1/calls/call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk/recording' \
  -H "Authorization: Bearer $TOTEM_API_KEY"
Response · 200JSON
{
  "object": "call_recording",
  "call_id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
  "url": "https://storage.googleapis.com/totem-402908-eu/teams/example/calls/example/recording.wav?X-Goog-Signature=fictitious",
  "expires_at": "2026-10-01T09:30:00.000Z",
  "content_type": "audio/wav",
  "size": 100
}

Update dispatched call analysis

PATCH /v1/calls/{id}/analysis

Processes one system-analyzer callback for the exact dispatched call generation under current system delegation and source-bound context. Ordinary integrations and assistants cannot use this grant, and the content-free receipt distinguishes eligible writes from deferred finite analysis. The original dispatch admits one logical callback; reuse its Idempotency-Key after uncertainty.

Scopes
calls:analysis:write
Rate limit
write

Path parameters

  • id string Required ID prefix call_…

    The call's public id.

Headers

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

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

Request body

System-analysis-only callback bound to one current call generation. Unavailable finite evidence preserves prior confirmed values.

  • summary string ≤ 5000 chars

    Analyzer summary for the exact dispatched call. Existing language and voicemail policies apply.

  • custom_values object

    At most 50 exact-name scalar extractions. Strings fit the existing 2,000-character lead value contract; empty and null values never delete existing fields.

  • finite_fields Array<string> 1–3 items

    Request existing finite Decisions fields from persisted source evidence. Caller-inferred verdict values are never accepted.

    Possible values
    • user_sentiment
    • call_successful
    • in_voicemail

Returns

Returns an AnalysisReceipt object.

Errors

+ 12 common errors

PATCH /v1/calls/{id}/analysis
# 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/calls/call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk/analysis' \
  -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 '{"summary": "The customer requested a follow-up consultation."}'
Response · 200JSON
{
  "object": "analysis_receipt",
  "resource_kind": "call",
  "summary_updated": true,
  "custom_values_updated": false,
  "finite_status": "deferred"
}

The Call object

A call: its direction, timing and a normalized outcome. No recording or transcript.

Attributes

  • id string ID prefix call_…

    Public id of the record.

  • object string

    Always call.

  • livemode boolean

    true for real data; false in example data.

  • team string ID prefix team_…

    The team this record belongs to.

  • lead string Nullable ID prefix lead_…

    The lead this call is linked to, or null when it is unlinked or the lead no longer exists. Identity (name, phone) travels on the lead only.

  • direction string Nullable

    inbound or outbound; null when not stored.

    Possible values
    • inbound
    • outbound
  • started_at string Nullable Format date-time

    When the call started (UTC), or when it was recorded if the provider gave no start time.

  • duration_seconds integer Nullable Range ≥ 0

    Whole seconds of the call (rounded down); null while the call is still live, or when not stored.

  • outcome string

    How the call ended: answered_human, answered_ai, voicemail, no_answer, busy, failed, or unknown (still live, or no evidence of who answered). Read it with outcome_basis.

    Possible values
    • answered_human
    • answered_ai
    • voicemail
    • no_answer
    • busy
    • failed
    • unknown
  • outcome_basis string

    The evidence behind outcome: inbound_verdict (Totem's classification of an inbound call on its phone lines), ai_analysis (Totem's classification of the recorded status, end reason and duration of an assistant call), duration_floor (a call on a connected Zadarma PBX, where at least 10 seconds counts as answered), carrier_answer_only (only the carrier's answer signal, which never counts as answered, so a connected call reads unknown: every outbound call on Totem's phone lines, made by the AI or by a person, and an inbound one Totem has not classified), browser_session (a web voice session with the assistant), or none (no evidence, as for a call that is still live).

    Possible values
    • inbound_verdict
    • ai_analysis
    • duration_floor
    • carrier_answer_only
    • browser_session
    • none
  • version integer Range ≥ 1

    Increases 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_at string Format date-time

    When Totem recorded this version (UTC). It is not the time the business event happened.

Call · exampleJSON
{
  "id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
  "object": "call",
  "livemode": false,
  "team": "team_r9uYrIW4gSFJJ6hZQ9ip1UIpPaAD1CF7NR",
  "lead": "lead_r72EfbRNUzuqORFJR0O8HxAwEXd93jGUTYMaMMXKSF0QbLS8CiUKJpEP34LFQG",
  "direction": "inbound",
  "started_at": "2026-09-28T10:17:00.000Z",
  "duration_seconds": 184,
  "outcome": "answered_ai",
  "outcome_basis": "inbound_verdict",
  "version": 2,
  "updated_at": "2026-09-28T10:21:04.010Z"
}

The CallBindingOptions object

Current eligible calling options. Reading does not dial, reserve budget or change configuration.

Attributes

  • object string

    Always call_binding_options.

  • data Array<object> ≤ 100 items

    Bounded current published selections. Select one explicitly.

  • complete boolean

    Whether this bounded response includes every current usable selection.

CallBindingOptions · exampleJSON
{
  "object": "call_binding_options",
  "data": [
    {
      "object": "call_binding",
      "reference": "tcall1.cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
      "assistant_name": "Example assistant",
      "line_label": "Example office",
      "line_number": "+12025550123",
      "channel": "phone"
    }
  ],
  "complete": true
}

The CallStartReceipt object

Minimal truthful call-start acceptance receipt.

Attributes

  • object string

    Always call_start_receipt.

  • status string

    The provider accepted call initiation. This is not evidence that the person answered or the call completed.

  • call_id string Nullable ID prefix call_…

    Opaque canonical call id when its retained record exists; otherwise null. Never a raw provider id.

CallStartReceipt · exampleJSON
{
  "object": "call_start_receipt",
  "status": "accepted",
  "call_id": null
}

The CallTranscript object

Explicitly authorized call speech content.

Attributes

  • object string

    Always call_transcript.

  • call_id string ID prefix call_…

    Current retained call.

  • text string ≤ 200000 chars

    Speech-only transcript in its original order. Tool arguments and results are excluded.

  • complete boolean

    False when the current transcript exceeds the response limit. It does not indicate that an ongoing call has ended.

CallTranscript · exampleJSON
{
  "object": "call_transcript",
  "call_id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
  "text": "Please send the service guide.",
  "complete": true
}

The CallRecording object

An existing canonical European recording, never an arbitrary provider URL.

Attributes

  • object string

    Always call_recording.

  • call_id string ID prefix call_…

    Current retained call.

  • url string Format uri

    Intentional authorized recording disclosure: a bounded URL for the existing owned European application artifact.

  • expires_at string Format date-time

    Expiry of this URL. Later access requires a fresh authorized request.

  • content_type string Nullable 1–255 chars

    Stored artifact media type when available.

  • size integer Nullable Range ≥ 0

    Stored artifact size in bytes when available.

CallRecording · exampleJSON
{
  "object": "call_recording",
  "call_id": "call_m2kUbFcayHlZ5Lgs9xZNmDS3c3Jvk",
  "url": "https://storage.googleapis.com/totem-402908-eu/teams/example/calls/example/recording.wav?X-Goog-Signature=fictitious",
  "expires_at": "2026-10-01T09:30:00.000Z",
  "content_type": "audio/wav",
  "size": 100
}

The AnalysisReceipt object

Content-free stored callback receipt. Acceptance never claims every deferred analysis task has completed.

Attributes

  • object string

    Always analysis_receipt.

  • resource_kind string

    Resource whose current analysis was processed.

    Possible values
    • call
    • meeting
  • summary_updated boolean

    Whether this logical callback committed its eligible summary.

  • custom_values_updated boolean

    Whether this callback committed any eligible call extraction into its current retained lead; always false for meetings.

  • finite_status string

    Status of requested canonical finite fields. Deferred or unavailable is never a completed paid classification.

    Possible values
    • not_requested
    • applied
    • deferred
    • unavailable
AnalysisReceipt · exampleJSON
{
  "object": "analysis_receipt",
  "resource_kind": "call",
  "summary_updated": true,
  "custom_values_updated": false,
  "finite_status": "deferred"
}

API version 1.0.0