Provision (buy) a number
Buy a specific available number and attach it to your org, optionally binding it to an agent_id for inbound routing. When search reports assisted ordering, support may pre-order the number and you can explicitly set provisioning_mode=adopt_preowned; this never places a new order. Recording runs in PyAI’s media bridge. Connected minutes bill on telephony.minutes ($0.01/min). Requires the telephony:manage scope.
Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Headers
Required safe retry key. Reusing the key with an identical body replays the original 201 response (no second number purchase); reusing it with a different body returns 409 idempotency_conflict.
255Body
A US, Canada, or India number (E.164) from the available-numbers search.
"+14155550123"
Optional agent to route inbound calls to.
Use adopt_preowned only for a number already ordered through assisted provisioning. It never buys a number.
automated, adopt_preowned Response
Provisioned
"telephony.number"
"pn_..."
E.164.
"+14155550123"
"US"
"415"
Agent that answers inbound calls to this number.
Whether PyAI recording is enabled for the number.
active, released Unix ms.
Unix ms.