Skip to Content
Developers
Routing

Publish a call flow’s draft

Needs the routing:write scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/account/call-flows/{id}/publish

Publishes the draft as the flow’s next version; the campaign’s calls run it from then on. The draft is checked again first (422 flow_not_ready, with the issues), a draft equal to the published version is refused (422 flow_unchanged), and a flow on no campaign cannot be published (422 flow_unassigned). With ifVersion, a flow changed since is refused (409 version_conflict).

Authorization

key
headerAuthorizationBearer <traki_account_…>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
note?string

What changed, kept on the version.

Lengthlength <= 200
ifVersion?string

The version the change is based on. When the record has changed since, the change is refused with 409 version_conflict.

Match^\d{1,16}$

Response Body

Success

application/json
  1. response
id*string
Formatuuid
code*string
name*string
description*string|null
campaignId*|null
status*string
publishedVersion*|null
publishedAt*string|null
latestVersion*integer
Range-9007199254740991 <= value <= 9007199254740991
draftRevision*integer
Range-9007199254740991 <= value <= 9007199254740991
version*string
createdAt*string
updatedAt*string
draft*

The draft document: the same JSON the portal’s flow builder edits (schema 1).

draftChanged*boolean

Whether the draft differs from the published version.

issues*array<>
Example Request
curl -X POST 'https://api.traki.io/v1/account/call-flows/497f6eca-6276-4993-bfeb-53cbbbba6f08/publish' \  -H "Authorization: Bearer $TRAKI_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: a-unique-id-for-this-change' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "code": "string",  "name": "string",  "description": "string",  "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",  "status": "string",  "publishedVersion": -9007199254740991,  "publishedAt": "string",  "latestVersion": -9007199254740991,  "draftRevision": -9007199254740991,  "version": "string",  "createdAt": "string",  "updatedAt": "string",  "draft": {    "property1": null,    "property2": null  },  "draftChanged": true,  "issues": [    {      "code": "string",      "severity": "string",      "message": "string",      "nodeId": "string"    }  ]}