Skip to main content
POST
Create a managed human calling session

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Headers

Idempotency-Key
string
required

Body

application/json
from_number_id
string
required
Maximum string length: 200
to
string
required

E.164 destination in the US, Australia or India. Supply this or destinations.

user_id
string
required
Required string length: 1 - 200
client_reference
string
required
Required string length: 1 - 200
recording
boolean
required
destinations
string[]

Parallel US/AU/IN E.164 destinations. Order is part of the immutable intent. Each line needs its own calling permission and consent; retries never start a new group.

Required array length: 2 - 4 elements
use_case
enum<string>
default:support
Available options:
transactional,
support,
sales,
collections,
survey
max_duration_seconds
integer
default:3600
Required range: 30 <= x <= 3600
transfer_enabled
boolean
default:false

Opt into a transferable single-destination session where enabled. Cannot be combined with destinations. Existing sessions keep their original transport.

Response

Durable call and ephemeral browser capability. Never cache the token.

object
string
required
Allowed value: "telephony.browser_session"
id
string
required
call_id
string
required
transport
string
required
Allowed value: "voice-sdk"
access_token
string | null
required

Opaque token valid for three minutes; null after consumption, cancellation or expiry.

expires_at
integer
required

Unix milliseconds.

connect_params
object
required
call
object
required