Calls API

List calls

GET/v1/calls

List the organization's calls, newest first by default.

Query parameters

searchstring

Case-insensitive match on the agent name.

statusarray<string>

Call status; repeat or comma-separate. `all` disables the filter.

agent_idarray<string>

Agent id; repeat or comma-separate.

directionstring

`inbound` or `outbound`.

call_typestring

`phone_call` or `web_call`.

disconnection_reasonarray<string>

Repeat or comma-separate.

from_numberstring
to_numberstring
user_sentimentstring

`Positive`, `Neutral` or `Negative`.

call_successfulboolean
Show 9 more parameters
start_afterinteger

Started at or after this time, epoch ms.

start_beforeinteger

Started before this time, epoch ms.

date_fromstring

YYYY-MM-DD or ISO-8601; inclusive.

date_tostring

YYYY-MM-DD (whole day) or ISO-8601; inclusive.

sort_orderstring

Default "desc"

limitinteger

Cursor mode: calls per page.

pagination_keystring

Cursor mode: the `pagination_key` returned with the previous page.

pageinteger

Page mode: 1-based page number.

Default 1

page_sizeinteger

Page mode: calls per page.

Default 10

Returns

200 with the fields below.

callsarray<object>required
32 properties
idstringrequired
agent_idstringrequired

Empty string when the call has no agent.

agent_versionnumberrequired

The published agent version this call ran. 0 is the live draft, which is what a call runs unless a number or the request that created it pinned a version.

agent_namestringrequired
statusstringrequired

Dialgem's lifecycle state.

One of active, queued, completed, failed

call_statusstringrequired

The same state in session vocabulary: active→ongoing, completed→ended, failed→error, queued→registered.

One of ended, ongoing, registered, error

call_typestringrequired

One of phone_call, web_call

directionstringrequired

One of inbound, outbound

metadataobjectrequired

Your own data, attached when the call was created or later with `calls.update`.

dynamic_variablesobjectrequired

The dynamic variables the call was started with.

Show 22 more parameters
started_atstringrequired

ISO 8601, no timezone suffix (UTC). Empty string if unknown.

ended_atstringrequired

ISO 8601, no timezone suffix (UTC). `null` while the call is ongoing.

start_timestampnumberrequired

Epoch milliseconds.

end_timestampnumberrequired

Epoch milliseconds. `null` while the call is ongoing.

duration_snumberrequired
duration_msnumberrequired
phone_numberstringrequired
from_numberstringrequired
to_numberstringrequired
call_sidstringrequired

Carrier call id (Twilio CallSid). Empty string if none.

origination_statestringrequired
transcriptarray<object>required

One entry per turn. Empty when the agent opts out of transcript storage, and once the agent's `data_retention_days` purge has run. PII-redacted when redaction is on.

transcript_textstringrequired

The same transcript as one string, `Agent: …` / `User: …` per line.

recording_urlstringrequired

Presigned URL that expires; download it promptly rather than storing the link.

eventsarray<object>required
disconnection_reasonstringrequired

One of error, user_hangup, agent_hangup, call_transfer, voicemail_reached, inactivity, max_duration_reached, manual_stopped, dial_no_answer, flow_dead_end, flow_loop_guard

in_voicemailbooleanrequired

Whether the call reached voicemail or an answering machine.

amd_resultobjectrequired
analysisobjectrequired

Post-call analysis. `null` until the call has ended and been analyzed, and after a retention purge.

call_costobjectrequired

Set once the call is finalized.

end_to_end_latency_msnumberrequired

Mean time from the caller's final transcript to the agent's first audio byte.

latencyobjectrequired

Per-stage latency percentiles, recorded when the call ends. `null` if no turn completed.

has_morebooleanrequired
pagination_keystringrequired
curl "https://api.dialgem.com/v1/calls" \
  -H "X-API-Key: $DIALGEM_API_KEY"
Response 200
{
  "calls": [
    {
      "id": "3f2b8c1e-7d4a-4e9b-9c1a-2b6d5e8f0a14",
      "agent_id": "3f2b8c1e-7d4a-4e9b-9c1a-2b6d5e8f0a14",
      "agent_version": 0,
      "agent_name": "Front desk",
      "status": "completed",
      "call_status": "ended",
      "call_type": "phone_call",
      "direction": "inbound",
      "metadata": {},
      "dynamic_variables": {},
      "started_at": "2026-11-07T14:32:10",
      "ended_at": "2026-11-07T14:32:10",
      "start_timestamp": 1794060730000,
      "end_timestamp": 1794060730000,
      "duration_s": 42,
      "duration_ms": 42,
      "phone_number": "+14155550123",
      "from_number": "+14155550123",
      "to_number": "+14155550123",
      "call_sid": "example",
      "origination_state": "example",
      "transcript": [
        {
          "role": null,
          "text": null,
          "timestamp": null
        }
      ],
      "transcript_text": "Hello, how can I help?",
      "recording_url": "https://example.com/recording.wav",
      "events": [
        {}
      ],
      "disconnection_reason": "user_hangup",
      "in_voicemail": false,
      "amd_result": {},
      "analysis": {
        "call_summary": "Hello, how can I help?",
        "user_sentiment": "Positive",
        "call_successful": false,
        "in_voicemail": false,
        "variables": {},
        "model": "gpt-4o-mini",
        "extracted_at": "2026-11-07T14:32:10",
        "error": "example"
      },
      "call_cost": {
        "combined_cost": 0,
        "total_duration_seconds": 42,
        "total_duration_unit_price": 42,
        "product_costs": [
          null
        ]
      },
      "end_to_end_latency_ms": 1,
      "latency": {}
    }
  ],
  "has_more": false,
  "pagination_key": "example"
}

Get call

GET/v1/calls/{call_id}

Path parameters

call_idstringrequired

Returns

200 with the fields below.

idstringrequired

The call's id. Use it with `GET /v1/calls/{call_id}`.

agent_idstringrequired

The agent that handled the call. Empty when the call was not matched to an agent.

agent_versionintegerrequired

The published agent version the call ran. 0 is the live draft.

agent_namestringrequired

The agent's name when the call started. A later rename does not change it. `Unknown` when not recorded.

statusstringrequired

Call state: `queued`, `active`, `completed` or `failed`.

call_statusstringrequired

`status` in session terms: `registered`, `ongoing`, `ended` or `error`.

call_typestringrequired

`phone_call` or `web_call`.

directionstringrequired

`inbound` or `outbound`.

metadataobjectrequired

The JSON object you attached to the call. Empty when you attached none.

dynamic_variablesobjectrequired

The values that filled `{{name}}` placeholders in the agent's prompt for this call.

Show 22 more parameters
started_atstringrequired

ISO 8601 time the call started (UTC). Empty if unknown.

duration_snumberrequired

Call length in seconds. 0 until the call ends.

phone_numberstringrequired

The caller's number on an inbound call, the number dialed on an outbound one. Empty for a web call.

from_numberstringrequired

The number the call came from, in E.164 format. Empty for a web call.

to_numberstringrequired

The number the call went to, in E.164 format. Empty for a web call.

call_sidstringrequired

The carrier's id for the call. Empty for a web call.

transcriptarray<object>required

The conversation turn by turn, in order. Each turn has `role` (`agent` or `user`), `text` and a timestamp. Empty when the agent does not store transcripts.

transcript_textstringrequired

The same conversation as plain text, one `Agent:` or `User:` line per turn.

eventsarray<object>required

Things that happened during the call, such as keypad presses, voicemail detection and transfers. Each has `type`, `ts` (milliseconds into the call) and `data`.

in_voicemailbooleanrequired

True when the call reached voicemail or an answering machine.

ended_atstring

ISO 8601 time the call ended (UTC). Null while it is in progress.

start_timestampinteger

Start time in milliseconds since the Unix epoch.

end_timestampinteger

End time in milliseconds since the Unix epoch. Null while the call is in progress.

duration_msinteger

Call length in milliseconds. Null until the call ends.

origination_statestring

How an outbound call progressed: `queued`, `ringing`, `answered` or `failed`. Null for an inbound call.

recording_urlstring

A temporary link to the call recording. Null when there is no recording.

disconnection_reasonstring

Why the call ended, such as `agent_hangup` or `user_hangup`. Null while it is in progress.

amd_resultobject

The answering-machine check for an outbound call, with its `decision`. Null when none ran.

analysisobject

The post-call analysis. Holds `call_summary`, `user_sentiment`, `call_successful`, `in_voicemail`, your custom fields under `variables`, the `model` used, `extracted_at` and `error`. Null until analysis has run.

call_costobject

What the call cost, in units of $0.0001. Holds `combined_cost`, `total_duration_seconds`, `total_duration_unit_price` and an itemized `product_costs` list. Null until the call ends, and hidden (null) for dashboard users with the member role, since spend is visible to owners and admins only.

end_to_end_latency_msnumber

Average time from the caller finishing a sentence to the agent's first audio, in milliseconds. Null when no turn completed.

latencyobject

Latency percentiles per stage (`e2e`, `llm`, `tts`, `endpointing`), each with `p50`, `p90`, `p95`, `p99`, `min`, `max` and `num`, in milliseconds. A stage with no samples is left out. Null when no turn completed.

curl "https://api.dialgem.com/v1/calls/CALL_ID" \
  -H "X-API-Key: $DIALGEM_API_KEY"
Response 200
{
  "id": "string",
  "agent_id": "agent_123",
  "agent_version": 0,
  "agent_name": "string",
  "status": "string",
  "call_status": "string",
  "call_type": "string",
  "direction": "string",
  "metadata": {},
  "dynamic_variables": {},
  "started_at": "string",
  "ended_at": "string"
}

Update call

PATCH/v1/calls/{call_id}

Update a call.

Path parameters

call_idstringrequired

Request body application/json

metadataobject

Returns

200 with the fields below.

idstringrequired

The call's id. Use it with `GET /v1/calls/{call_id}`.

agent_idstringrequired

The agent that handled the call. Empty when the call was not matched to an agent.

agent_versionintegerrequired

The published agent version the call ran. 0 is the live draft.

agent_namestringrequired

The agent's name when the call started. A later rename does not change it. `Unknown` when not recorded.

statusstringrequired

Call state: `queued`, `active`, `completed` or `failed`.

call_statusstringrequired

`status` in session terms: `registered`, `ongoing`, `ended` or `error`.

call_typestringrequired

`phone_call` or `web_call`.

directionstringrequired

`inbound` or `outbound`.

metadataobjectrequired

The JSON object you attached to the call. Empty when you attached none.

dynamic_variablesobjectrequired

The values that filled `{{name}}` placeholders in the agent's prompt for this call.

Show 22 more parameters
started_atstringrequired

ISO 8601 time the call started (UTC). Empty if unknown.

duration_snumberrequired

Call length in seconds. 0 until the call ends.

phone_numberstringrequired

The caller's number on an inbound call, the number dialed on an outbound one. Empty for a web call.

from_numberstringrequired

The number the call came from, in E.164 format. Empty for a web call.

to_numberstringrequired

The number the call went to, in E.164 format. Empty for a web call.

call_sidstringrequired

The carrier's id for the call. Empty for a web call.

transcriptarray<object>required

The conversation turn by turn, in order. Each turn has `role` (`agent` or `user`), `text` and a timestamp. Empty when the agent does not store transcripts.

transcript_textstringrequired

The same conversation as plain text, one `Agent:` or `User:` line per turn.

eventsarray<object>required

Things that happened during the call, such as keypad presses, voicemail detection and transfers. Each has `type`, `ts` (milliseconds into the call) and `data`.

in_voicemailbooleanrequired

True when the call reached voicemail or an answering machine.

ended_atstring

ISO 8601 time the call ended (UTC). Null while it is in progress.

start_timestampinteger

Start time in milliseconds since the Unix epoch.

end_timestampinteger

End time in milliseconds since the Unix epoch. Null while the call is in progress.

duration_msinteger

Call length in milliseconds. Null until the call ends.

origination_statestring

How an outbound call progressed: `queued`, `ringing`, `answered` or `failed`. Null for an inbound call.

recording_urlstring

A temporary link to the call recording. Null when there is no recording.

disconnection_reasonstring

Why the call ended, such as `agent_hangup` or `user_hangup`. Null while it is in progress.

amd_resultobject

The answering-machine check for an outbound call, with its `decision`. Null when none ran.

analysisobject

The post-call analysis. Holds `call_summary`, `user_sentiment`, `call_successful`, `in_voicemail`, your custom fields under `variables`, the `model` used, `extracted_at` and `error`. Null until analysis has run.

call_costobject

What the call cost, in units of $0.0001. Holds `combined_cost`, `total_duration_seconds`, `total_duration_unit_price` and an itemized `product_costs` list. Null until the call ends, and hidden (null) for dashboard users with the member role, since spend is visible to owners and admins only.

end_to_end_latency_msnumber

Average time from the caller finishing a sentence to the agent's first audio, in milliseconds. Null when no turn completed.

latencyobject

Latency percentiles per stage (`e2e`, `llm`, `tts`, `endpointing`), each with `p50`, `p90`, `p95`, `p99`, `min`, `max` and `num`, in milliseconds. A stage with no samples is left out. Null when no turn completed.

curl -X PATCH "https://api.dialgem.com/v1/calls/CALL_ID" \
  -H "X-API-Key: $DIALGEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200
{
  "id": "string",
  "agent_id": "agent_123",
  "agent_version": 0,
  "agent_name": "string",
  "status": "string",
  "call_status": "string",
  "call_type": "string",
  "direction": "string",
  "metadata": {},
  "dynamic_variables": {},
  "started_at": "string",
  "ended_at": "string"
}

Delete call

DELETE/v1/calls/{call_id}

Permanently delete a finished call: its record, transcript, analysis and recording.

Path parameters

call_idstringrequired

Returns

200 with the fields below.

deletedbooleanrequired

Always true on success.

idstringrequired

The id of the call that was deleted.

curl -X DELETE "https://api.dialgem.com/v1/calls/CALL_ID" \
  -H "X-API-Key: $DIALGEM_API_KEY"
Response 200
{
  "deleted": false,
  "id": "string"
}

Stop call

POST/v1/calls/{call_id}/stop

End an ongoing call now, as if the agent had hung up.

Path parameters

call_idstringrequired

Returns

202 with the fields below.

idstringrequired

The call that is being stopped.

stoppingbooleanrequired

Always true. The call ends a moment later and its record then shows `manual_stopped`.

curl -X POST "https://api.dialgem.com/v1/calls/CALL_ID/stop" \
  -H "X-API-Key: $DIALGEM_API_KEY"
Response 202
{
  "id": "string",
  "stopping": false
}

Rerun call analysis

POST/v1/calls/{call_id}/rerun-analysis

Run a finished call's post-call analysis again and return the updated call.

Path parameters

call_idstringrequired

Returns

200 with the fields below.

idstringrequired

The call's id. Use it with `GET /v1/calls/{call_id}`.

agent_idstringrequired

The agent that handled the call. Empty when the call was not matched to an agent.

agent_versionintegerrequired

The published agent version the call ran. 0 is the live draft.

agent_namestringrequired

The agent's name when the call started. A later rename does not change it. `Unknown` when not recorded.

statusstringrequired

Call state: `queued`, `active`, `completed` or `failed`.

call_statusstringrequired

`status` in session terms: `registered`, `ongoing`, `ended` or `error`.

call_typestringrequired

`phone_call` or `web_call`.

directionstringrequired

`inbound` or `outbound`.

metadataobjectrequired

The JSON object you attached to the call. Empty when you attached none.

dynamic_variablesobjectrequired

The values that filled `{{name}}` placeholders in the agent's prompt for this call.

Show 22 more parameters
started_atstringrequired

ISO 8601 time the call started (UTC). Empty if unknown.

duration_snumberrequired

Call length in seconds. 0 until the call ends.

phone_numberstringrequired

The caller's number on an inbound call, the number dialed on an outbound one. Empty for a web call.

from_numberstringrequired

The number the call came from, in E.164 format. Empty for a web call.

to_numberstringrequired

The number the call went to, in E.164 format. Empty for a web call.

call_sidstringrequired

The carrier's id for the call. Empty for a web call.

transcriptarray<object>required

The conversation turn by turn, in order. Each turn has `role` (`agent` or `user`), `text` and a timestamp. Empty when the agent does not store transcripts.

transcript_textstringrequired

The same conversation as plain text, one `Agent:` or `User:` line per turn.

eventsarray<object>required

Things that happened during the call, such as keypad presses, voicemail detection and transfers. Each has `type`, `ts` (milliseconds into the call) and `data`.

in_voicemailbooleanrequired

True when the call reached voicemail or an answering machine.

ended_atstring

ISO 8601 time the call ended (UTC). Null while it is in progress.

start_timestampinteger

Start time in milliseconds since the Unix epoch.

end_timestampinteger

End time in milliseconds since the Unix epoch. Null while the call is in progress.

duration_msinteger

Call length in milliseconds. Null until the call ends.

origination_statestring

How an outbound call progressed: `queued`, `ringing`, `answered` or `failed`. Null for an inbound call.

recording_urlstring

A temporary link to the call recording. Null when there is no recording.

disconnection_reasonstring

Why the call ended, such as `agent_hangup` or `user_hangup`. Null while it is in progress.

amd_resultobject

The answering-machine check for an outbound call, with its `decision`. Null when none ran.

analysisobject

The post-call analysis. Holds `call_summary`, `user_sentiment`, `call_successful`, `in_voicemail`, your custom fields under `variables`, the `model` used, `extracted_at` and `error`. Null until analysis has run.

call_costobject

What the call cost, in units of $0.0001. Holds `combined_cost`, `total_duration_seconds`, `total_duration_unit_price` and an itemized `product_costs` list. Null until the call ends, and hidden (null) for dashboard users with the member role, since spend is visible to owners and admins only.

end_to_end_latency_msnumber

Average time from the caller finishing a sentence to the agent's first audio, in milliseconds. Null when no turn completed.

latencyobject

Latency percentiles per stage (`e2e`, `llm`, `tts`, `endpointing`), each with `p50`, `p90`, `p95`, `p99`, `min`, `max` and `num`, in milliseconds. A stage with no samples is left out. Null when no turn completed.

curl -X POST "https://api.dialgem.com/v1/calls/CALL_ID/rerun-analysis" \
  -H "X-API-Key: $DIALGEM_API_KEY"
Response 200
{
  "id": "string",
  "agent_id": "agent_123",
  "agent_version": 0,
  "agent_name": "string",
  "status": "string",
  "call_status": "string",
  "call_type": "string",
  "direction": "string",
  "metadata": {},
  "dynamic_variables": {},
  "started_at": "string",
  "ended_at": "string"
}

Create outbound call

POST/v1/calls/outbound

Originate an outbound call on behalf of the authenticated organization.

Request body application/json

tostringrequired
from_stringrequired
agent_idstring
agent_versioninteger | string

Default 0

dialgem_llm_dynamic_variablesobject
metadataobject

Returns

201 with the fields below.

call_idstringrequired

The new call's id. Use it with `GET /v1/calls/{call_id}`.

call_sidstringrequired

The carrier's id for the call.

origination_statestringrequired

Where the call stands. `queued` when it was handed to the carrier.

curl -X POST "https://api.dialgem.com/v1/calls/outbound" \
  -H "X-API-Key: $DIALGEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+14155550123",
    "from_": "+14155550123"
  }'
Response 201
{
  "call_id": "call_123",
  "call_sid": "string",
  "origination_state": "string"
}

Register call

POST/v1/calls/register

Register a call and return a signed media-stream URL for it.

Request body application/json

agent_idstringrequired
agent_versioninteger | string

Default 0

from_numberstring
to_numberstring
call_sidstring
directionstring

Default "inbound"

dialgem_llm_dynamic_variablesobject
metadataobject

Returns

201 with the fields below.

call_idstringrequired

The new call's id. Use it with `GET /v1/calls/{call_id}`.

stream_urlstringrequired

A signed media-stream URL. Put it in the `<Stream url=...>` of the TwiML you return to Twilio.

expires_inintegerrequired

Seconds until the stream URL stops working.

curl -X POST "https://api.dialgem.com/v1/calls/register" \
  -H "X-API-Key: $DIALGEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_123"
  }'
Response 201
{
  "call_id": "call_123",
  "stream_url": "https://example.com",
  "expires_in": 0
}