Async execution and callbacks
Queue a live execution, poll its status, or receive a signed completion notification.
Queue an execution #
Use POST /api/v1/flows/{flowId}/execute with a live key, a new Idempotency-Key for a new operation, and this body:
{
"mode": "async",
"inputs": {
"age": 18
},
"metadata": {
"applicationId": "application-124"
}
}HTTP 202 means accepted into the queue, not completed:
{
"executionId": "EXECUTION_ID",
"status": "queued",
"metadata": {
"applicationId": "application-124"
},
"statusUrl": "/api/v1/executions/EXECUTION_ID"
}Poll for the result #
curl "$BASE_URL/api/v1/executions/EXECUTION_ID" \
-H "Authorization: Bearer $API_KEY"Use a credential with executions:read, access to the flow, and the same environment as the execution. Poll periodically while the execution is in a non-terminal state.
| Status | Meaning |
|---|---|
| queued | Waiting for processing. |
| running | Execution in progress. |
| completed | Terminal success; read outputs. |
| failed | Terminal failure; read error and errorCode. |
| cancelled | Terminal cancellation. |
Other intermediate states are possible. Only completed, failed, and cancelled are terminal.
Request a callback #
Add callbackUrl to an async request. The destination must be public HTTPS, without embedded credentials, fragments, or non-standard ports. Private addresses and redirects are rejected.
{
"mode": "async",
"inputs": {
"age": 18
},
"callbackUrl": "https://YOUR_SERVICE/hooks/logic-canvas"
}A live credential with its own signing key is required. Rotate an older credential without a signing key before using callbacks.
Verify the signature #
- Save the separate Callback signing key when creating or rotating the API credential.
- Select the key using
X-Logic-Canvas-Key-Id. - Compute HMAC-SHA256 over
webhookId.timestamp.rawBodyusing the values ofX-Logic-Canvas-Webhook-Id,X-Logic-Canvas-Webhook-Timestamp, and the original unmodified request body. - Compare it in constant time with the
v1=value inX-Logic-Canvas-Signature. - Reject stale timestamps and deduplicate by webhookId.
Events are execution.completed and execution.failed. Retain the previous verification key for outstanding deliveries after credential rotation.