QISMATADocumentationProductOpen Studio
USER GUIDE

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:

json
{
  "mode": "async",
  "inputs": {
    "age": 18
  },
  "metadata": {
    "applicationId": "application-124"
  }
}

HTTP 202 means accepted into the queue, not completed:

json
{
  "executionId": "EXECUTION_ID",
  "status": "queued",
  "metadata": {
    "applicationId": "application-124"
  },
  "statusUrl": "/api/v1/executions/EXECUTION_ID"
}

Poll for the result #

bash
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.

StatusMeaning
queuedWaiting for processing.
runningExecution in progress.
completedTerminal success; read outputs.
failedTerminal failure; read error and errorCode.
cancelledTerminal 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.

json
{
  "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 #

  1. Save the separate Callback signing key when creating or rotating the API credential.
  2. Select the key using X-Logic-Canvas-Key-Id.
  3. Compute HMAC-SHA256 over webhookId.timestamp.rawBody using the values of X-Logic-Canvas-Webhook-Id, X-Logic-Canvas-Webhook-Timestamp, and the original unmodified request body.
  4. Compare it in constant time with the v1= value in X-Logic-Canvas-Signature.
  5. 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.

Qismata documentation