Phone Numbers

Save call flow draft

Changed on

Creates or updates the working draft of a phone number's call flow. The draft is validated leniently and is not live until published. Optimistic concurrency: pass the lock_version returned by a previous read to detect a concurrent edit, and base_published_version to detect a publish that happened mid-edit.

put/v2/api/numbers/{number}/call_flow/draft

Request

  • Base URL
    https://api.withallo.com
  • URL
    https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft
  • Auth
    API key in header Authorization

Path parameters

numberstring required
Example:+14155551234

Allo phone number in E.164 format

Request body

definitionobject required

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

schema_versioninteger required

Must match the server's current call flow schema version.

lock_versioninteger nullable

The lock_version of the draft you are updating; omit or null to upsert without a concurrency check.

base_published_versioninteger nullable

The published version your edit is based on; a mismatch means someone published mid-edit (409).

engine_subset'NESTED_IVR' | 'FULL_FLOW' nullable

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. Send FULL_FLOW for flows you build through the API. When omitted, it is inferred from the nodes: FULL_FLOW only if the flow has a business-hours, contact-property, country-code or send-SMS node, otherwise NESTED_IVR. A line whose flow is already FULL_FLOW keeps it.

Example request

{
  "schema_version": 1
}

Response

The saved draft

Example response

{
  "data": {
    "id": "cflv-abc123",
    "flow_id": "cflw-abc123",
    "version": 3,
    "status": "PUBLISHED",
    "schema_version": 1,
    "engine_subset": "FULL_FLOW",
    "number": "+14155551234",
    "confirmation_url": "https://app.withallo.com/call-flow-draft/cflv-abc123",
    "entry_node_id": "node-22"
  }
}

Changes