Flow webhooks
Start a Tolky flow from any system by calling the webhook URL of its "Receive external data" step.
A flow that starts with the Receive external data step gets its own web address. When another system calls that address, for example your website form, your ERP or a payment provider, the flow runs with the data it received.
Each step has two addresses, both shown in the step settings in Flows:
| Address | What it runs | When it works |
|---|---|---|
| Test URL | The current draft of the flow. The result shows up in the editor. | Always, even if the flow is not active. |
| Production URL | The published version of the flow. | Only while Flow active in production is on. |
These addresses do not use your API token. Anyone who has the URL can start the flow. Share it only with the system that needs it.
Protection against repeated calls
- Automatic protection is always on: each address accepts at most one call per interval. The interval is shown in the step. Faster calls are refused without running the flow.
- Ignore repeated calls is optional. Choose one of the step's Parameters, such as an order number or e-mail, and a time window. Calls with the same value inside the window run the flow only once.
ReferenceTechnical details
Always copy the URL from the step settings. The examples below use https://api.tolky.to, but the address shown in your step is the one to use.
Addresses
| Path | Runs |
|---|---|
/api/automations/webhooks/{workflowId}/{nodeId} | Production, for a specific step. |
/api/automations/webhooks/{workflowId} | Production, when the flow has a single webhook step. |
/api/automations/webhooks/test/{workflowId}/{nodeId} | Test, for a specific step. |
/api/automations/webhooks/test/{workflowId} | Test, when the flow has a single webhook step. |
{nodeId} is the step ID, or the custom URL path set in the step (letters a-z, numbers, - and _, up to 64 characters).
Authentication: none. The flow and its account come from {workflowId}.
Method: use the HTTP method set in the step (POST by default). The body can be JSON, form data or plain text. The flow receives body, headers and query; the Parameters you declare in the step are read from the body or the query.
curl -X POST "https://api.tolky.to/api/automations/webhooks/3f0c2a8e-.../new-lead" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-4821" \
-d '{ "name": "Maria", "email": "maria@example.com", "order": "4821" }'Duplicate events
A call is treated as a repeat of an earlier one, and does not start a new run, when it carries the same Idempotency-Key (or X-Request-Id) header. Without these headers, an id or event_id field in the body plays the same role. The answer then has status: "deduped" and the runId of the original run.
Responses
| Code | status | Meaning |
|---|---|---|
202 | enqueued | Production call accepted. The flow runs in the background. Comes with runId. |
200 | completed and others | The flow finished. The test URL also returns output. |
200 | deduped | Repeated call, ignored. Comes with runId, and dedupParam and windowSeconds when Ignore repeated calls blocked it. |
| any | When the flow has a Reply to caller step, production waits for it and returns exactly the status, headers and body that step defines. | |
404 | Flow not found, no webhook step matches the address, or the flow is empty. | |
409 | Production URL called while the flow is inactive or not published yet. | |
429 | throttled | Blocked by the automatic protection. Wait the seconds in the Retry-After header. |
500 | failed | The flow failed. error has the reason. |
504 | timeout | The flow did not reach its response step in time. |
{ "success": true, "status": "enqueued", "runId": "3f0c2a8e-..." }Error answers carry error, plus motivo (reason) and comoResolver (steps to fix), in Portuguese.