API

Guides

Messages

Voice

WhatsApp Business

Groups

Contacts

Outbox

Account

Sender IDs

Teammate/Subaccount

Conversations

Workflows

Message Templates

Birthday Message

Opt-out

Other

Webhooks (v2)

Workflow definition

The objects you send to Create workflow and Update workflow and get back from Get workflow. What goes into data.config is described on the Triggers, Conditions and Actions pages.

The workflow object

Key Values Description
namestring, 1 to 255 charactersShown in the panel.
nodeslist of 1 to 200 nodesSee below. A draft can have zero or one trigger node.
edgeslist of 0 to 400 edgesSee below. Always sent together with nodes.
viewportoptional { x, y, zoom }Position of the builder canvas.
metaoptional objectFree-form data, stored as is.

An account can have at most 100 workflows (error 168). An invalid definition returns http status 400 with error 164 and an error_info list with every problem as { path, message }, e.g. nodes.2.data.config.operator. Keys that are not documented are rejected with their path, so a typo in a config key is caught before the workflow runs.

Nodes

{
	"id": "reply",
	"type": "actionNode",
	"position": { "x": 640, "y": 120 },
	"data": {
		"title": "Auto-reply",
		"config": { "actionType": "send_sms", "messageType": "reply_message", "message": "Thanks {{ contact.firstname }}, we will get back to you." }
	}
}
Key Values Description
idstring, 1 to 64 charactersUnique within the workflow; edges refer to it.
typetriggerNode / conditionNode / actionNodeWhat kind of node this is.
data.configobject, requiredThe settings of the node: Triggers, Conditions, Actions.
data.titleoptional string, max. 255Label shown in the builder and in execution results.
data.subtitleoptional string, max. 255Second line in the builder.
positionoptional { x, y }Where the builder draws the node.
width, heightoptional numbersBuilder layout.

selected, dragging and positionAbsolute (builder state) are accepted and stripped.

Edges

{ "id": "e2", "source": "is_stop", "sourceHandle": "true", "target": "opt_out", "targetHandle": "in" }
{ "id": "e2", "source": "is_stop", "sourceHandle": "true", "target": "opt_out", "targetHandle": "in" }
Key Values Description
idstringUnique within the workflow.
sourcenode idThe node the edge leaves.
sourceHandleout / true / false / fallbackWhich output of the source node: out for trigger and action nodes (default), true or false for condition nodes, fallback for send_whatsapp_message.
targetnode idThe node the edge enters. A trigger node can never be a target.
targetHandleabsent or inNodes have one input.
typeoptional stringEdge style in the builder.

Other builder keys (animated, label, style, markerEnd, ...) are accepted and stripped. Several edges may leave the same handle (every branch runs) and a node may have several incoming edges.

IDs inside a definition

Like everywhere in the API, objects are referenced by their public ID; numeric IDs are accepted on input and every ID is checked against your account. A forged ID or one of the wrong type (e.g. a sub_ ID where a group is expected) is reported as a definition error (164) at its path.

Object Public ID Where it appears
Workflowflw_...{flow_id} in the URL, id in responses. uuid is the ID the panel uses in the URL of the builder.
Contact groupgid_...groupid / groupId in action and trigger configs and the value of a contact.group_id condition. Always gid_... in responses.
Team membersub_...teamMember / teamMembers of assign_conversation. Always sub_... in responses (see List subaccounts).
Inbox / virtual numbernumeric (0 = every inbox)inboxId of the inbound_message trigger. A num_... ID is accepted in the value of a message.inbox_id condition; responses stay numeric.
Contactcon_...contact_id of Run workflow and Get sample payload.
Executionuuid{execution_id} in the URL, id / execution in responses.

Publish rules

A draft only has to be well-formed. To be published a workflow additionally needs:

Rule Error
Exactly one trigger node with a triggerType165, error_info names the problem
Every node reachable from the trigger165, error_info lists the unreachable node IDs
A cron trigger in seconds mode has an interval of at least 10165

SMS API

Smstools
Integrate our SMS Gateway by implementing our SMS API, and add text messaging to your platform in minutes. Free trial. SMS API
5 out of 5 based on 3302 user ratings.
SMSGATEWAYAPI API1

REGISTER NOW

Discover our SMS platform today!

REGISTER