Calls API
List calls
List the organization's calls, newest first by default.
Query parameters
Case-insensitive match on the agent name.
Call status; repeat or comma-separate. `all` disables the filter.
Agent id; repeat or comma-separate.
`inbound` or `outbound`.
`phone_call` or `web_call`.
Repeat or comma-separate.
`Positive`, `Neutral` or `Negative`.
Show 9 more parameters
Started at or after this time, epoch ms.
Started before this time, epoch ms.
YYYY-MM-DD or ISO-8601; inclusive.
YYYY-MM-DD (whole day) or ISO-8601; inclusive.
Default "desc"
Cursor mode: calls per page.
Cursor mode: the `pagination_key` returned with the previous page.
Page mode: 1-based page number.
Default 1
Page mode: calls per page.
Default 10
Returns
200 with the fields below.
32 properties
Empty string when the call has no agent.
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.
Dialgem's lifecycle state.
One of active, queued, completed, failed
The same state in session vocabulary: active→ongoing, completed→ended, failed→error, queued→registered.
One of ended, ongoing, registered, error
One of phone_call, web_call
One of inbound, outbound
Your own data, attached when the call was created or later with `calls.update`.
The dynamic variables the call was started with.
Show 22 more parameters
ISO 8601, no timezone suffix (UTC). Empty string if unknown.
ISO 8601, no timezone suffix (UTC). `null` while the call is ongoing.
Epoch milliseconds.
Epoch milliseconds. `null` while the call is ongoing.
Carrier call id (Twilio CallSid). Empty string if none.
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.
The same transcript as one string, `Agent: …` / `User: …` per line.
Presigned URL that expires; download it promptly rather than storing the link.
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
Whether the call reached voicemail or an answering machine.
Post-call analysis. `null` until the call has ended and been analyzed, and after a retention purge.
Set once the call is finalized.
Mean time from the caller's final transcript to the agent's first audio byte.
Per-stage latency percentiles, recorded when the call ends. `null` if no turn completed.
curl "https://api.dialgem.com/v1/calls" \
-H "X-API-Key: $DIALGEM_API_KEY"{
"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
Path parameters
Returns
200 with the fields below.
The call's id. Use it with `GET /v1/calls/{call_id}`.
The agent that handled the call. Empty when the call was not matched to an agent.
The published agent version the call ran. 0 is the live draft.
The agent's name when the call started. A later rename does not change it. `Unknown` when not recorded.
Call state: `queued`, `active`, `completed` or `failed`.
`status` in session terms: `registered`, `ongoing`, `ended` or `error`.
`phone_call` or `web_call`.
`inbound` or `outbound`.
The JSON object you attached to the call. Empty when you attached none.
The values that filled `{{name}}` placeholders in the agent's prompt for this call.
Show 22 more parameters
ISO 8601 time the call started (UTC). Empty if unknown.
Call length in seconds. 0 until the call ends.
The caller's number on an inbound call, the number dialed on an outbound one. Empty for a web call.
The number the call came from, in E.164 format. Empty for a web call.
The number the call went to, in E.164 format. Empty for a web call.
The carrier's id for the call. Empty for a web call.
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.
The same conversation as plain text, one `Agent:` or `User:` line per turn.
Things that happened during the call, such as keypad presses, voicemail detection and transfers. Each has `type`, `ts` (milliseconds into the call) and `data`.
True when the call reached voicemail or an answering machine.
ISO 8601 time the call ended (UTC). Null while it is in progress.
Start time in milliseconds since the Unix epoch.
End time in milliseconds since the Unix epoch. Null while the call is in progress.
Call length in milliseconds. Null until the call ends.
How an outbound call progressed: `queued`, `ringing`, `answered` or `failed`. Null for an inbound call.
A temporary link to the call recording. Null when there is no recording.
Why the call ended, such as `agent_hangup` or `user_hangup`. Null while it is in progress.
The answering-machine check for an outbound call, with its `decision`. Null when none ran.
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.
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.
Average time from the caller finishing a sentence to the agent's first audio, in milliseconds. Null when no turn completed.
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"{
"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
Update a call.
Path parameters
Request body application/json
Returns
200 with the fields below.
The call's id. Use it with `GET /v1/calls/{call_id}`.
The agent that handled the call. Empty when the call was not matched to an agent.
The published agent version the call ran. 0 is the live draft.
The agent's name when the call started. A later rename does not change it. `Unknown` when not recorded.
Call state: `queued`, `active`, `completed` or `failed`.
`status` in session terms: `registered`, `ongoing`, `ended` or `error`.
`phone_call` or `web_call`.
`inbound` or `outbound`.
The JSON object you attached to the call. Empty when you attached none.
The values that filled `{{name}}` placeholders in the agent's prompt for this call.
Show 22 more parameters
ISO 8601 time the call started (UTC). Empty if unknown.
Call length in seconds. 0 until the call ends.
The caller's number on an inbound call, the number dialed on an outbound one. Empty for a web call.
The number the call came from, in E.164 format. Empty for a web call.
The number the call went to, in E.164 format. Empty for a web call.
The carrier's id for the call. Empty for a web call.
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.
The same conversation as plain text, one `Agent:` or `User:` line per turn.
Things that happened during the call, such as keypad presses, voicemail detection and transfers. Each has `type`, `ts` (milliseconds into the call) and `data`.
True when the call reached voicemail or an answering machine.
ISO 8601 time the call ended (UTC). Null while it is in progress.
Start time in milliseconds since the Unix epoch.
End time in milliseconds since the Unix epoch. Null while the call is in progress.
Call length in milliseconds. Null until the call ends.
How an outbound call progressed: `queued`, `ringing`, `answered` or `failed`. Null for an inbound call.
A temporary link to the call recording. Null when there is no recording.
Why the call ended, such as `agent_hangup` or `user_hangup`. Null while it is in progress.
The answering-machine check for an outbound call, with its `decision`. Null when none ran.
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.
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.
Average time from the caller finishing a sentence to the agent's first audio, in milliseconds. Null when no turn completed.
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 '{}'{
"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
Permanently delete a finished call: its record, transcript, analysis and recording.
Path parameters
Returns
200 with the fields below.
Always true on success.
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"{
"deleted": false,
"id": "string"
}Stop call
End an ongoing call now, as if the agent had hung up.
Path parameters
Returns
202 with the fields below.
The call that is being stopped.
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"{
"id": "string",
"stopping": false
}Rerun call analysis
Run a finished call's post-call analysis again and return the updated call.
Path parameters
Returns
200 with the fields below.
The call's id. Use it with `GET /v1/calls/{call_id}`.
The agent that handled the call. Empty when the call was not matched to an agent.
The published agent version the call ran. 0 is the live draft.
The agent's name when the call started. A later rename does not change it. `Unknown` when not recorded.
Call state: `queued`, `active`, `completed` or `failed`.
`status` in session terms: `registered`, `ongoing`, `ended` or `error`.
`phone_call` or `web_call`.
`inbound` or `outbound`.
The JSON object you attached to the call. Empty when you attached none.
The values that filled `{{name}}` placeholders in the agent's prompt for this call.
Show 22 more parameters
ISO 8601 time the call started (UTC). Empty if unknown.
Call length in seconds. 0 until the call ends.
The caller's number on an inbound call, the number dialed on an outbound one. Empty for a web call.
The number the call came from, in E.164 format. Empty for a web call.
The number the call went to, in E.164 format. Empty for a web call.
The carrier's id for the call. Empty for a web call.
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.
The same conversation as plain text, one `Agent:` or `User:` line per turn.
Things that happened during the call, such as keypad presses, voicemail detection and transfers. Each has `type`, `ts` (milliseconds into the call) and `data`.
True when the call reached voicemail or an answering machine.
ISO 8601 time the call ended (UTC). Null while it is in progress.
Start time in milliseconds since the Unix epoch.
End time in milliseconds since the Unix epoch. Null while the call is in progress.
Call length in milliseconds. Null until the call ends.
How an outbound call progressed: `queued`, `ringing`, `answered` or `failed`. Null for an inbound call.
A temporary link to the call recording. Null when there is no recording.
Why the call ended, such as `agent_hangup` or `user_hangup`. Null while it is in progress.
The answering-machine check for an outbound call, with its `decision`. Null when none ran.
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.
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.
Average time from the caller finishing a sentence to the agent's first audio, in milliseconds. Null when no turn completed.
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"{
"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
Originate an outbound call on behalf of the authenticated organization.
Request body application/json
Default 0
Returns
201 with the fields below.
The new call's id. Use it with `GET /v1/calls/{call_id}`.
The carrier's id for the call.
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"
}'{
"call_id": "call_123",
"call_sid": "string",
"origination_state": "string"
}Register call
Register a call and return a signed media-stream URL for it.
Request body application/json
Default 0
Default "inbound"
Returns
201 with the fields below.
The new call's id. Use it with `GET /v1/calls/{call_id}`.
A signed media-stream URL. Put it in the `<Stream url=...>` of the TwiML you return to Twilio.
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"
}'{
"call_id": "call_123",
"stream_url": "https://example.com",
"expires_in": 0
}