Workflows
Start a Workflow Run
Starts one contact through a workflow whose published Start when is Your system asks. A number this workspace has never seen gets a contact made for it, so a brand-new lead from your CRM can go straight in. variables are this run's own values: a blank written {{contact.order}} fills from variables.order. started: false is a 200, not an error: the contact is already going through it, or the workflow's settings do not let them go through it again. Calls and messages the workflow sends are billed as usual. Needs a full key.
POST/workflows/{workflowId}/runs
Path parameters
- workflowIdstringrequired
- The workflow's id (
wf_…). With Start when set to Your system asks, the builder shows this endpoint with the id, ready to copy. A bare uuid also works.
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Request body
- tostringrequired
- The contact's phone number, with its country code.
- namestring
- Their name, used for a new contact and for
{{contact.name}}. - emailstring
- Their email, used for a new contact.
- variablesobject
- Up to 20 values for this run (text, numbers or true/false; names up to 60 characters, values up to 300). Not
name,emailorphone: send those as fields.
Example request
bash
curl -X POST "https://app.katexs.com/api/v1/workflows/{workflowId}/runs" \
-H "Authorization: Bearer $KATEXS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+1 415 555 0134",
"name": "Asha",
"email": "asha@example.com",
"variables": {
"order": "10432",
"city": "Austin"
}
}'Responses
| Status | Description |
|---|---|
200 | Not started: already going through it, or not allowed through it again. Branch on started. |
201 | Started. |
400 | The body is not JSON, to is missing or not a phone number, or variables breaks a rule. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | No workflow with that id in this workspace. |
409 | The workflow is not published with Start when: Your system asks, or it is paused. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
Response fields
- startedbooleanrequired
- Whether the contact was started through the workflow.
- reasonstring
- Why not, when
startedis false.
200 response
{
"started": false,
"reason": "Already going through this workflow, or the workflow's settings do not let them go through it again."
}Last updated November 2026 · Found a problem? Email support@katexs.com
