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 or Australia.

user_id
string
required
Required string length: 1 - 200
client_reference
string
required
Required string length: 1 - 200
recording
boolean
required
use_case
enum<string>
default:support
Available options:
transactional,
support,
sales,
collections,
survey
max_duration_seconds
integer
default:3600
Required range: 30 <= x <= 3600

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