Skip to main content
POST
Publish call flow
Required scope: PHONE_NUMBERS_WRITE

Behavior

Publishes the working draft, making it the live call flow for the phone number. The {number} path parameter is the Allo phone number in E.164 format. Pass the lock_version of the draft you are publishing — fetch it with Get call flow draft.
This changes live inbound routing immediately. If you would rather have a person confirm the change, don’t call this endpoint: Save call flow draft returns a confirmation_url where a signed-in user reviews the draft and publishes it themselves.
Publishing runs full validation, which is stricter than the lenient validation a draft save runs — a draft that saved successfully can still fail to publish. If any rule fails, the whole publish is rolled back and the previously live flow keeps routing calls. Publishing consumes the draft: the draft version becomes the published version, so the line is left with no draft and the response carries no confirmation_url. Start the next edit cycle with a fresh PUT …/call_flow/draft.

Errors

  • 400 CALL_FLOW_INVALID — the draft failed full validation.
  • 400 CALL_FLOW_ROOT_MENU_TOO_SMALL — the line runs an IVR and this flow would leave its menu with fewer than 2 options.
  • 400 CALL_FLOW_CONTACT_PROPERTY_KEY_REQUIRED — a CONTACT_PROPERTY node has no propertyKey.
  • 400 CALL_FLOW_CONTACT_PROPERTY_VALUE_REQUIRED — a CONTACT_PROPERTY node has no expectedValue.
  • 400 CALL_FLOW_CONTACT_PROPERTY_UNKNOWN — a CONTACT_PROPERTY node’s propertyKey does not name a custom person property of your team. Renaming or deleting a property in the CRM invalidates a flow that branches on it.
  • 404 CALL_FLOW_DRAFT_NOT_FOUND — there is no draft to publish. Save one first with PUT /v2/api/numbers/{number}/call_flow/draft.
  • 404 PHONE_NUMBER_NOT_FOUND — the number is not one of your account’s numbers.
  • 409 CALL_FLOW_STALE_LOCK — the lock_version is stale; refetch the draft and retry.

Authorizations

Authorization
string
header
required

Path Parameters

number
string
required

Allo phone number in E.164 format

Example:

"+14155551234"

Body

application/json
lock_version
integer
required

The lock_version of the draft you are publishing.

Example:

0

Response

The published call flow

data
object

A version of a phone number's call flow.