Workflows
Run a workflow by webhook or API
Trigger a published workflow from any system with its webhook URL and token, or from your code with POST /v1/workflows/run.
Guide2 min readUpdated 23 October 2026
Only published workflows run from outside the designer. There are two ways in: a webhook URL that any system can call, and the API for your own code.
Before you start
- A published workflow. A draft triggered by webhook gets 409
WORKFLOW_NOT_PUBLISHED. - For the webhook: its URL and trigger token, from the Webhook trigger panel in the designer.
- For the API: your secret
sk-so-key from API keys. See API keys.
Steps: webhook
- 1
Copy the URL and token
In the designer, open Webhook trigger and use Copy URL. The token starts with
wft_and is shown once; store it in your secrets. Only a SHA-256 hash of it is kept. - 2
Send the input as JSON
POST a JSON object to the URL with the token in the
X-Workflow-Tokenheader (or?token=). The body becomes the Start input; it can be up to 100 KB.Webhook trigger curl -X POST "https://app.sentientone.ai/api/workflows/hooks/$WORKFLOW_ID?wait=true" \ -H "Content-Type: application/json" \ -H "X-Workflow-Token: $WORKFLOW_TOKEN" \ -d '{"email": "sam@example.com", "message": "My invoice is wrong"}' - 3
Read the answer
Without
?wait=truethe call answers 202 straight away with the run id. With?wait=trueit waits up to 30 seconds and returns the finished run, or 202 with status running if it takes longer.Default response HTTP/1.1 202 Accepted{"run_id": "8d1f…", "status": "queued"}
Steps: from your code
POST https://api.sentientone.ai/v1/workflows/run with X-Api-Key, the workflow_id, input and mode: "live". It streams each step as server-sent events, or returns the finished run as JSON with "stream": false. Full reference: Workflows API.
curl https://api.sentientone.ai/v1/workflows/run \ -H "Content-Type: application/json" \ -H "X-Api-Key: $SENTIENTONE_API_KEY" \ -d '{"workflow_id": "…", "mode": "live", "stream": false, "input": {"email": "sam@example.com", "message": "My invoice is wrong"}}'You're done when
The call returns a run id, and the run shows under Runs in the designer with status succeeded and each block's output.
Rotating the trigger token
Rotate the token from the Webhook trigger panel if it leaks. The old token stops working immediately, so update every caller first or straight after.
If something goes wrong
401 Invalid workflow or token
The token is missing or wrong, or the workflow id in the URL is. Send it exactly as copied in X-Workflow-Token, or rotate it and use the new one.
409 WORKFLOW_NOT_PUBLISHED
Publish the workflow in the designer. Drafts can't be triggered.
429 from the webhook
Each workflow takes 60 webhook calls a minute. Slow down or spread calls out.
429 TOO_MANY_RUNNING from the API
An account runs at most 5 workflows at once; wait for one to finish (the response carries Retry-After: 10). The API also takes 30 run requests a minute per account.
400 INVALID_INPUT
The input doesn't match the Start block: a required field is empty or a field is an object or list. The message names the field.
Still stuck?
Email us with what you tried and any request id. A person replies.