API referencePhone

End a live call

Ends a live call immediately, tearing the connection down so a runaway agent or a call stuck on voicemail stops ringing and stops billing the moment this returns.

Endpoint
POST https://api.dairo.app/v1/phone/calls/{id}/hangup

Ends a live call immediately, tearing the connection down so a runaway agent or a call stuck on voicemail stops ringing and stops billing the moment this returns. Before disconnecting, Dairo reads the call's final duration, transcript, and cost and settles them onto the row, then sets status to canceled. A call that was still queued and never dialed is canceled locally, so hanging up in that window is a true cancel-before-dial. A call that has already reached a terminal status returns 409. Requires the phone:call scope.

Scope: phone:call. Send the API key as a bearer token; Scopes lists what each one reaches.

Request

cURL
curl -X POST "https://api.dairo.app/v1/phone/calls/3fa85f64-5717-4562-b3fc-2c963f66afa6/hangup" \
  -H "Authorization: Bearer $DAIRO_API_KEY"

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe phone call's ID.

Response

200 Success. Body: application/json, PhoneCall.

FieldTypeRequiredDescription
object"phone_call"yes
idstring (uuid)yes
direction"outbound", "inbound"yesoutbound for calls placed with POST /v1/phone/calls, inbound for calls answered by a number's inbound agent.
status"queued", "initiating", "ringing", "in_progress", "completed", "failed", "no_answer", "busy", "canceled"yesTerminal: completed, failed, no_answer, busy, canceled.
fromNumberstringyes
toNumberstringyes
instructionsstring or nullno
greetingstring or nullno
voicestring or nullnoThe Dairo Live voice id.
modelstring or nullnoAlways dairo-live.
languagestring or nullno
maxDurationSecondsinteger or nullno
voicemailMessagestring or nullno
queuedAtstring (date-time) or nullno
startedAtstring (date-time) or nullno
answeredAtstring (date-time) or nullno
endedAtstring (date-time) or nullno
durationSecondsinteger or nullno
hangupCausestring or nullno
answeredBystring or nullnohuman or machine, from answering-machine detection.
summarystring or nullno
notesarray of PhoneCallNote or nullnoInbound calls: the caller's structured notes (tasks, notes, reminders, messages).
costUsdnumber or nullnoBilled per started minute: the $0.09/min Dairo Live rate plus the destination's telephony rate. Calls that never connect are free.
errorstring or nullno
metadataobjectno
idempotencyKeystring or nullno
createdAtstring (date-time)yes
200
{
  "object": "phone_call",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "direction": "outbound",
  "status": "queued",
  "fromNumber": "string",
  "toNumber": "string",
  "instructions": null,
  "greeting": null,
  "voice": null,
  "model": null,
  "language": null,
  "maxDurationSeconds": null,
  "voicemailMessage": null,
  "queuedAt": "2026-10-19T09:30:00Z",
  "startedAt": "2026-10-19T09:30:00Z",
  "answeredAt": "2026-10-19T09:30:00Z",
  "endedAt": "2026-10-19T09:30:00Z",
  "durationSeconds": null,
  "hangupCause": null,
  "answeredBy": null,
  "summary": null,
  "notes": [
    {
      "kind": "task",
      "text": "Thanks for signing up.",
      "due": "string"
    }
  ],
  "costUsd": null,
  "error": null,
  "metadata": {},
  "idempotencyKey": null,
  "createdAt": "2026-10-19T09:30:00Z"
}

Errors

Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.

StatusMeaning
400The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch).
401The API key is missing or invalid.
403The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted).
404No such resource in this account (resource_not_found).
409The resource already exists or its state does not allow this (duplicate_resource or a condition-specific code).
429Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached).
500An unexpected error; retry with backoff, then contact support (internal_error).

On this page