Skip to main content
POST
Publish an AI phone agent
Requires the phone:write scope. Send the revision you read from Get draft as expected_revision. Publishing is all or nothing: either every setting in the draft goes live, or none does. Refusals carry a code beside the message, so your code can branch on the reason: Calls already in progress finish with the settings they started with. A new agent created with POST /phone takes no calls until its first publish. To put an earlier version live again, use Publish earlier version. The draft is reset to that version too, so its unpublished changes are discarded.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

phone_agent_id
string
required

Body

application/json
expected_revision
integer
required

The draft revision the publisher reviewed. Publishing refuses a newer draft.

Required range: -9007199254740991 <= x <= 9007199254740991

Response

Default Response

agent_id
string
required
version
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
revision
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991