Skip to main content
Look up any action on a call here. To place a call, start with the Quick Start; to connect two people, see Multiple Participants. The Python examples run inside with Client() as client: with calls = client.telephony.calls, where call_id is the id create returned. The cURL examples use your credentials with CALL_ID set to that id. Every method raises TelephonyAPIError on an error response - see Errors. Every request sends Authorization: Token $UNPOD_PLATFORM_TOKEN and Org-Handle: $UNPOD_ORG_HANDLE, plus Content-Type: application/json when it has a body.

Options

create and add_participant take the same options. Over HTTP they are body fields of the same name (from_ is from), and idempotency_key is the Idempotency-Key header.
Every callback and audio URL (status_callback_url, recording_callback_url, answer_url and the play_audio URL) must be public https. Unpod checks this before the call reaches the SBC: anything else returns 400 invalid_url.

Play audio and speak

leg_id is the leg_id from create, add_participant or an event (or caller / callee); omit it to play to everyone on the call. Each leg gets PlayStarted / PlayStopped events with the same play_id. speak answers 503 tts_unavailable when speech can’t be made (the call carries on) and 429 rate_limited when your org sends too many at once.

Transfer and DTMF

transfer doesn’t work yet through the API - don’t rely on it. It answers 200 as soon as the request is queued, so a transfer that fails still looks like success. An attended transfer doesn’t return the consult leg’s id yet, so transfer_complete and transfer_cancel have nothing to act on.
For DTMF and transfer, leg_id takes only "caller" or "callee" - not the leg_id from create or an event - and goes over HTTP as leg. Anything else returns 400 bad_request.

Inspect and end calls

Right after hangup, get and end can briefly answer 404 not_found - treat it as done. To get a call’s recording once it ends, see Recording. For a full production flow - dial an agent, connect the customer, end the call cleanly - see Number Masking.

Errors

Branch on .code, not the message:
Over HTTP the code is in code, or in detail for checks Unpod makes before the call reaches the SBC (call_api_disabled, from_not_owned). The SDK raises ValueError before sending when speak text is over 1000 characters or send_dtmf digits fall outside 0-9 A-D * #.