Calls
Calls, recordings and transcripts use three key scopes: calls, recordings and transcripts. A key with only calls:read cannot read recordings or transcripts.
List calls
Section titled “List calls”curl "https://app.airfone.app/v1/calls?limit=10&missed=true" \ -H "Authorization: Bearer $AIRFONE_KEY"{ "data": [ { "id": "6f1c...", "kind": "pstn", "status": "missed", "started_at": "2026-10-12T04:10:00Z", "ended_at": "2026-10-12T04:10:20Z", "duration_seconds": 20, "number": "+9779800000000", "contact_id": null, "contact_name": null, "transcript_lines": 0 } ], "has_more": false, "next_cursor": null}Pass next_cursor as cursor to get the next page. q searches words said on the call or part of a number.
Get a call
Section titled “Get a call”curl https://app.airfone.app/v1/calls/$CALL_ID -H "Authorization: Bearer $AIRFONE_KEY"Place a call
Section titled “Place a call”The assistant calls the number and talks about the agenda. This needs calls:write.
curl https://app.airfone.app/v1/calls \ -H "Authorization: Bearer $AIRFONE_KEY" \ -H "Content-Type: application/json" \ -d '{"to": "+9779800000000", "agenda": "Confirm tomorrow'"'"'s 10am delivery."}'{ "id": "b2d9...", "to": "+9779800000000", "status": "queued", "call_at": null, "livemode": true }The id is the id of the request. The call shows up in the list once it is dialled. Calling hours and the do-not-call list apply. If the workspace has no credit to spend, the response is 402 with code insufficient_credit.
With a test key nothing is dialled. The status is simulated and livemode is false.
Hang up
Section titled “Hang up”curl -X POST https://app.airfone.app/v1/calls/$CALL_ID/hangup \ -H "Authorization: Bearer $AIRFONE_KEY"Returns 204. Needs calls:write.
Recordings
Section titled “Recordings”Needs recordings:read. Recordings are deleted at expires_at.
curl "https://app.airfone.app/v1/recordings?call_id=$CALL_ID" -H "Authorization: Bearer $AIRFONE_KEY"curl https://app.airfone.app/v1/recordings/$RECORDING_ID/download -H "Authorization: Bearer $AIRFONE_KEY"{ "url": "https://...", "content_type": "audio/mpeg", "duration_ms": 61250, "expires_in": 300 }The link is made on each request and stops working after expires_in seconds. Ask again when it expires.
Transcripts
Section titled “Transcripts”Needs transcripts:read.
curl https://app.airfone.app/v1/transcripts/$CALL_ID -H "Authorization: Bearer $AIRFONE_KEY"{ "call_id": "6f1c...", "turns": [ { "seq": 1, "speaker": "assistant", "text": "Hello, how can I help?", "language": "en", "confidence": 0.97, "started_at": "2026-10-12T04:10:02Z", "ended_at": "2026-10-12T04:10:05Z" } ]}speaker is caller, assistant or agent. Use after_seq to read only new turns while a call is on.