Allo

Publish call flow

Publishes the working draft, making it the live call flow for the phone number. This changes live inbound routing immediately. Runs full validation, which is…

POST/v2/api/numbers/{number}/call_flow/publish

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. Get it with Get call flow draft.

Publishing keeps the draft's engine_subset. A NESTED_IVR flow only runs its root phone menu on live calls: save the draft with "engine_subset": "FULL_FLOW" to run the whole tree. See Engine subset.

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.

Authorization

Authorizationstring · headerrequired

Api-Key ak_live_…

Path parameters

numberstringrequired

Allo phone number in E.164 format

Body

lock_versionintegerrequired

The lock_version of the draft you are publishing.

Responses

200The published call flow
dataobject

A version of a phone number's call flow.

11 fields
idstring | null

The call flow version ID. Null for a synthesized (never-persisted) flow.

flow_idstring | null

The parent call flow ID. Null for a synthesized flow.

versioninteger

Monotonic version number within the flow.

statusenum<string>

DRAFT (working copy), PUBLISHED (live), or SYNTHESIZED (in-memory representation of a legacy IVR-only line).

DRAFTPUBLISHEDSYNTHESIZED

lock_versioninteger

Optimistic-concurrency token; pass it back on the next draft save.

schema_versioninteger

The call flow schema version this definition conforms to.

engine_subsetenum<string>

FULL_FLOW runs the whole tree on live calls. NESTED_IVR runs only the root phone menu: its keys that lead to a nested menu, a condition or a voicemail node do nothing.

NESTED_IVRFULL_FLOW

numberstring | null

E.164 of the line this flow routes. Null for a never-persisted SYNTHESIZED flow.

confirmation_urlstring | null

A link where a signed-in user reviews this draft and publishes it. Present only on a DRAFT (a PUBLISHED or SYNTHESIZED version has nothing to confirm). Use it when a person should approve the change; to go live without one, call POST /v2/api/numbers/{number}/call_flow/publish. Treat it as opaque: pass it through verbatim, and never construct or parse it.

entry_node_idstring

The id of the entry node in definition.nodes.

definitionobject

The call flow tree document (opaque; camelCase keys).

400
401
404
409
429