Skip to main content
GET
Get the draft of an AI phone agent
Requires the phone:read scope. Every change you make to an agent through the API (PATCH /phone/{phone_agent_id} and the knowledge sources, workflows and caller number endpoints) is saved to its draft. Calls keep using the live settings until you publish. Agents on the older runtimes have no draft: their changes still apply immediately, and the draft endpoints answer 400 for them. The SIP endpoints (inbound numbers, outbound trunk, transfer destinations) change the live agent immediately, and the same change is copied into its draft.
  • published is false for an agent that was never published. It takes no calls yet.
  • has_unpublished_changes tells you whether the draft differs from what is live.
  • field_changes records, for each setting edited in the draft, who changed it and when.
  • revision changes with every edit. Pass it to the publish endpoint so that only the draft you reviewed goes live.
GET /phone/{phone_agent_id} returns the published settings, or, for an agent that was never published, its draft with published: false. This endpoint shows the pending changes of a published agent.

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

Response

Default Response

agent_id
string
required
published
boolean
required

False until the agent is published for the first time.

revision
integer
required

Increases on every change to the draft. Send it back when publishing; compare it to tell whether the draft changed since it was read.

Required range: -9007199254740991 <= x <= 9007199254740991
has_unpublished_changes
boolean
required
live_version
integer | null
required

The version currently live; null until the first publish.

Required range: -9007199254740991 <= x <= 9007199254740991
config
object
required
field_changes
object
required

Who last changed each setting of the draft, and when.