Skip to main content
PUT
Replace a number's call flow

Authorizations

Authorization
string
header
required

HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).

Headers

If-Match
string

Required, except with draft=true. The ETag of the live flow, from your last read. A missing value, or *, is 428 CALL_FLOWS.IF_MATCH_REQUIRED; a value that no longer matches is 412 CALL_FLOWS.ETAG_MISMATCH.

Example:

"\"cf1-9fJ2kQx7Lr0aT3\""

Path Parameters

numberId
string
required

The number id, as List and search numbers returns it.

Example:

"600"

Query Parameters

draft
boolean
default:false

true saves a draft version instead of the live flow.

Body

application/json

The whole flow to save. The read-only fields of a read may be sent back and are ignored; any other unknown field is 400 VALIDATION.INVALID_BODY.

steps
(Ring user · object | Ring favorite user · object | Ring group · object | Voice agent · object | Playback · object | Voicemail · object | Redirect · object | Call recording · object | Fax · object | Change of caller · object | Dial by extension · object | IVR menu · object | Day/time splitter · object | Jump to · object | Condition splitter · object | HTTP request · object | Collect input · object | Mark call as resolved · object | Unsupported step · object)[]
required

1 to 200 steps in the whole flow. Keep a step by sending its id; steps you leave out are deleted, and steps without an id are created. To remove every step, use Delete a number's call flow.

Minimum array length: 1

One step of a call flow. type picks its fields. A step that branches, or that ends the call, is the last in its array. A branch is an array of steps with the same rules.

note
string

Optional, up to 255 characters: why you made the change, like a commit message. Stored on the version and shown in the version list. Not part of the flow.

Maximum string length: 255

Response

The saved flow, live from the next call, with its new ETag and versionId and any warnings.

The live flow after a save, a restore or a publish. New steps carry their stored id, and the ref you sent, once.

numberId
string
required
read-only

The number. Read-only.

Example:

"600"

etag
string
required
read-only

The same value as the ETag header. Read-only.

Example:

"\"cf1-9fJ2kQx7Lr0aT3\""

editable
boolean
required
read-only

false when the stored flow cannot be sent back unchanged; problems says why. With only DANGLING_REFERENCE problems, correct those fields and the save takes the document. true is not a guarantee: a flow saved in the Dashboard over a size limit, or with a ring step that has no ring time, reads editable: true, but sending it back unchanged is refused with 422, as the call flow document says. Read-only.

problems
object[]
required
read-only

Stored data the API cannot represent. Read-only.

businessHours
object
required

Whether business hours run before this flow. When closed, they decide what the caller hears, instead of the flow. Read-only.

steps
(Ring user · object | Ring favorite user · object | Ring group · object | Voice agent · object | Playback · object | Voicemail · object | Redirect · object | Call recording · object | Fax · object | Change of caller · object | Dial by extension · object | IVR menu · object | Day/time splitter · object | Jump to · object | Condition splitter · object | HTTP request · object | Collect input · object | Mark call as resolved · object | Unsupported step · object)[]
required

The main sequence, from "Call comes in". The first step runs first, then the next one in the array. A step that branches, or that ends the call, is the last in its array. 1 to 200 steps in the whole flow on a save; a number with no steps reads [].

One step of a call flow. type picks its fields. A step that branches, or that ends the call, is the last in its array. A branch is an array of steps with the same rules.

updatedAt
string<date-time>
required
read-only

Time of the latest saved version, or of the latest step change when no version exists. Read-only.

versionId
string | null
required
read-only

The latest version other than a draft, or null before the flow's first save. Read-only.

dashboardUrl
string
required
read-only

Opens this flow in the Dashboard designer, for an Admin. Read-only.

warnings
object[]
required

Warnings about the saved flow. They never stop a save.