Skip to main content

API endpoints

All paths are relative to https://api.blokkio.com. Every request needs a project API key, sent as Authorization: Bearer bk_live_… or X-Api-Key: bk_live_…. See Public API for authentication, pagination, errors and rate limits.

MethodPathScope
GET/api/v1/workflowsworkflows:read
GET/api/v1/workflows/{workflowId}workflows:read
POST/api/v1/workflows/{workflowId}/executeworkflows:execute
GET/api/v1/workflows/{workflowId}/exportworkflows:read
POST/api/v1/workflows/importworkflows:write
GET/api/v1/executionsexecutions:read
GET/api/v1/executions/{executionId}executions:read
POST/api/v1/executions/{executionId}/cancelexecutions:cancel

The examples below assume the key is in the BLOKKIO_API_KEY environment variable. Ids are GUIDs. A malformed id in the path returns 404.


List workflows​

GET /api/v1/workflows · scope workflows:read

Returns the workflows of the key's project, newest first.

QueryRequiredDefaultDescription
limitNo25Page size, clamped to 1–100.
cursorNonextCursor from the previous page.
curl "https://api.blokkio.com/api/v1/workflows?limit=2" \
-H "Authorization: Bearer $BLOKKIO_API_KEY"
{
"data": [
{
"id": "3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b",
"name": "New order → CRM",
"tags": ["sales"],
"isPublished": true,
"isEnabled": true,
"isSuspended": false,
"createdAt": "2026-11-02T09:14:27.512+00:00",
"updatedAt": "2026-11-10T16:03:11.004+00:00"
},
{
"id": "a91c0e55-6b7d-4c3e-8f21-0d4e5f6a7b8c",
"name": "Nightly report",
"tags": [],
"isPublished": false,
"isEnabled": true,
"isSuspended": false,
"createdAt": "2026-10-28T12:00:00+00:00",
"updatedAt": "2026-10-28T12:00:00+00:00"
}
],
"nextCursor": "NjM4NjYzMjQ4MDAwMDAwMDAwOmE5MWMwZTU1…"
}
FieldDescription
isPublishedThe workflow has a published revision. Only published workflows can be executed.
isEnabledfalse when the workflow is paused.
isSuspendedtrue when the workflow is suspended because the project exceeds its plan's limits.

Get a workflow​

GET /api/v1/workflows/{workflowId} · scope workflows:read

Returns one workflow, its published revision, and the triggers of that revision. Use a trigger's id as triggerId when you execute the workflow.

curl https://api.blokkio.com/api/v1/workflows/3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b \
-H "Authorization: Bearer $BLOKKIO_API_KEY"
{
"id": "3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b",
"name": "New order → CRM",
"tags": ["sales"],
"isPublished": true,
"isEnabled": true,
"isSuspended": false,
"createdAt": "2026-11-02T09:14:27.512+00:00",
"updatedAt": "2026-11-10T16:03:11.004+00:00",
"publishedRevision": 7,
"publishedAt": "2026-11-10T16:03:11.004+00:00",
"triggers": [
{ "id": "c0ffee00-1111-4222-8333-444455556666", "name": "Manual", "kind": "manual" },
{ "id": "d00dfeed-7777-4888-9999-aaaabbbbcccc", "name": "Order webhook", "kind": "webhook" }
]
}

publishedRevision and publishedAt are null and triggers is empty if the workflow was never published. Trigger kind is one of manual, webhook, schedule, integration, polling (Email, SFTP and Database row triggers) or other.

Errors: 404 not-found.


Execute a workflow​

POST /api/v1/workflows/{workflowId}/execute · scope workflows:execute

Starts a run of the workflow's published revision. Draft changes are not used. The run is a normal production run: it counts towards your plan's execution quota and appears in Logs.

Query parameters​

QueryRequiredDefaultDescription
waitNofalsetrue keeps the request open until the run finishes or timeout passes.
timeoutNo30Seconds to wait when wait=true, from 1 to 60. Values outside that range return 400.

Body​

The body is optional. Send Content-Type: application/json when you include one.

FieldRequiredDescription
dataNoA JSON object. It becomes the output of the trigger the run starts from. Any other JSON type returns 400.
triggerIdNoId of the trigger node to start from (see Get a workflow). Default: the first Manual trigger, otherwise the first Webhook trigger.
environmentIdNoId of an environment of the project. The run uses that environment's variables and secrets. Unknown ids return 400.

Inside the workflow, data is the trigger node's output, so you read it like any other node output. For example, use {{ $nodes['Manual'].orderId }} if the trigger node is named "Manual". This also applies to a Webhook trigger started through the API: its output is data itself, without the usual webhook request shape (no body, headers or query wrapper). See expressions.

Fire and forget​

curl -X POST https://api.blokkio.com/api/v1/workflows/3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b/execute \
-H "Authorization: Bearer $BLOKKIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "data": { "orderId": 42, "customer": "ACME" } }'

Response 202 Accepted, with a Location header pointing to /api/v1/executions/{executionId}:

{
"executionId": "7e57ab1e-0000-4abc-9def-123456789abc",
"status": "queued",
"startedAt": null,
"finishedAt": null,
"output": null
}

Wait for the result​

curl -X POST "https://api.blokkio.com/api/v1/workflows/3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b/execute?wait=true&timeout=20" \
-H "Authorization: Bearer $BLOKKIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "data": { "orderId": 42 } }'

If the run finishes within the timeout, the response is 200 OK:

{
"executionId": "7e57ab1e-0000-4abc-9def-123456789abc",
"status": "success",
"startedAt": "2026-11-11T10:15:02.118+00:00",
"finishedAt": "2026-11-11T10:15:03.941+00:00",
"output": { "crmId": "C-1029", "created": true }
}

output is the output of the last node that finished successfully. To return a specific value, end the workflow with the node that produces it. A failed run returns 200 with "status": "failed", so always check status.

If the run is still going when the timeout passes, for example because it is waiting at an approval gate, the response is 202 with the current status (queued, running or waiting_for_approval) and output: null. Continue with Get an execution.

tip

Use wait=true for short, request/response-style workflows. For anything that may take longer than a minute, start the run without wait and poll the execution.

Errors​

StatustypeCause
400validationdata is not an object, bad timeout, unknown triggerId or environmentId.
402quota-exceededThe plan's execution quota is used up.
404not-foundThe workflow is not in the key's project.
409workflow-not-publishedPublish the workflow first.
409workflow-suspendedThe project exceeds its plan's limits.
409workflow-disabledThe workflow is paused.
409no-api-triggerNo Manual or Webhook trigger, and no triggerId sent.

Export a workflow​

GET /api/v1/workflows/{workflowId}/export · scope workflows:read

Returns the workflow as a file: format=yaml (default, application/yaml) or format=json. Without revisionId it exports the draft (or the published version when there is no draft); pass a revisionId from the version history to export that version. Files never contain credentials. See Export and import for the format.

curl -H "Authorization: Bearer $BLOKKIO_API_KEY" \n "https://api.blokkio.com/api/v1/workflows/$WORKFLOW_ID/export?format=yaml" -o orders.blokkio.yaml

Import a workflow​

POST /api/v1/workflows/import · scope workflows:write

Send the file as it is (Content-Type: application/yaml or application/json) with options in the query, or a JSON body { "content": "…", "dryRun": false, "connections": { "slack/Team Slack": "<connection id>" }, "conflict": "copy", "replaceWorkflowId": null, "name": null }.

QueryMeaning
dryRun=truePreview only: nothing is created.
conflict=replaceReplace the draft of the workflow with the same name (or replaceWorkflowId). Never publishes. Default copy.
nameName for the new workflow (default: the name in the file).

The response is { dryRun, preview, existing, copyName, mode, workflow }. preview lists connections (with the connection each one is linked to and the candidates), secrets, apps, buildingBlocks, items, warnings and errors; a file with errors (unknown blocks) is refused with 400. Invalid files return 400 with a message per problem.

curl -X POST -H "Authorization: Bearer $BLOKKIO_API_KEY" -H "Content-Type: application/yaml" \n --data-binary @orders.blokkio.yaml "https://api.blokkio.com/api/v1/workflows/import?conflict=replace"

List executions​

GET /api/v1/executions · scope executions:read

Lists the project's top-level executions, newest first. Sub-workflow runs started by a Building block step are not included in the list, but you can fetch them by id.

QueryRequiredDefaultDescription
workflowIdNoOnly executions of this workflow.
statusNoOne of running, waiting_for_approval, success, failed, warning, cancelled. Others return 400.
limitNo25Page size, clamped to 1–100.
cursorNonextCursor from the previous page.
curl "https://api.blokkio.com/api/v1/executions?workflowId=3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b&status=failed" \
-H "Authorization: Bearer $BLOKKIO_API_KEY"
{
"data": [
{
"id": "7e57ab1e-0000-4abc-9def-123456789abc",
"workflowId": "3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b",
"status": "failed",
"isTestRun": false,
"startedAt": "2026-11-11T10:15:02.118+00:00",
"finishedAt": "2026-11-11T10:15:03.941+00:00",
"triggerId": "c0ffee00-1111-4222-8333-444455556666",
"environmentId": null,
"ranOn": { "kind": "cloud", "poolId": null, "poolName": null, "workerId": null, "workerName": null }
}
],
"nextCursor": null
}

ranOn says where the execution was sent: kind is cloud (Blokkio's hosted workers) or self_hosted (a worker pool, with poolId and poolName). It is null for executions from before this was recorded.

isTestRun is true for test runs started from the editor. finishedAt is null while the execution is running or waiting for approval.

Execution statuses​

StatusFinalMeaning
queuedNoAccepted but not started yet. Only returned by execute.
runningNoIn progress.
waiting_for_approvalNoParked at an approval gate.
successYesFinished without errors.
warningYesFinished, but some nodes failed and were handled.
failedYesFinished with an error.
cancelledYesCancelled by a user or through the API.

Get an execution​

GET /api/v1/executions/{executionId} · scope executions:read

Returns one execution with the result of every node that ran, in start order.

QueryRequiredDefaultDescription
includeInputNofalsetrue also returns each node's input. Inputs can be large.
curl https://api.blokkio.com/api/v1/executions/7e57ab1e-0000-4abc-9def-123456789abc \
-H "Authorization: Bearer $BLOKKIO_API_KEY"
{
"id": "7e57ab1e-0000-4abc-9def-123456789abc",
"workflowId": "3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b",
"status": "success",
"isTestRun": false,
"startedAt": "2026-11-11T10:15:02.118+00:00",
"finishedAt": "2026-11-11T10:15:03.941+00:00",
"triggerId": "c0ffee00-1111-4222-8333-444455556666",
"environmentId": null,
"parentExecutionId": null,
"output": { "crmId": "C-1029", "created": true },
"nodes": [
{
"id": "0b1c2d3e-4f50-4617-8293-a4b5c6d7e8f9",
"nodeId": "c0ffee00-1111-4222-8333-444455556666",
"nodeName": "Manual",
"status": "success",
"iterationIndex": null,
"startedAt": "2026-11-11T10:15:02.120+00:00",
"finishedAt": "2026-11-11T10:15:02.131+00:00",
"input": null,
"output": { "orderId": 42 },
"childExecutionId": null
},
{
"id": "1a2b3c4d-5e6f-4708-9192-a3b4c5d6e7f8",
"nodeId": "e1e2e3e4-0000-4000-8000-000000000001",
"nodeName": "Create CRM record",
"status": "success",
"iterationIndex": null,
"startedAt": "2026-11-11T10:15:02.140+00:00",
"finishedAt": "2026-11-11T10:15:03.930+00:00",
"input": null,
"output": { "crmId": "C-1029", "created": true },
"childExecutionId": null,
"ranOn": {
"kind": "self_hosted",
"poolId": "5ca1ab1e-0000-4000-8000-000000000001",
"poolName": "Home worker",
"workerId": "5ca1ab1e-0000-4000-8000-000000000002",
"workerName": "homelab-worker"
}
}
],
"ranOn": {
"kind": "self_hosted",
"poolId": "5ca1ab1e-0000-4000-8000-000000000001",
"poolName": "Home worker",
"workerId": null,
"workerName": null
}
}
FieldDescription
outputOutput of the last node that finished successfully (same as execute?wait=true).
parentExecutionIdSet when this execution is a sub-workflow run.
ranOnWhere the execution was sent (cloud or self_hosted with the pool). null for older executions.
nodes[].ranOnWhere this node run ran: cloud, or self_hosted with the pool and the worker that ran it. Names are kept as they were then. null for older executions.
nodes[].nodeIdId of the node in the workflow definition. A node inside a loop appears once per iteration.
nodes[].statusrunning, success, failed, waiting, timedout, pendingapproval or cancelled.
nodes[].iterationIndexLoop iteration number for nodes inside a loop body, else null.
nodes[].inputOnly filled with includeInput=true.
nodes[].childExecutionIdFor a Building block step (integration node): the id of the sub-workflow execution. Fetch it with this endpoint.

Errors: 404 not-found.

Polling example​

EXEC=7e57ab1e-0000-4abc-9def-123456789abc
while true; do
STATUS=$(curl -s https://api.blokkio.com/api/v1/executions/$EXEC \
-H "Authorization: Bearer $BLOKKIO_API_KEY" | jq -r .status)
echo "$STATUS"
case "$STATUS" in success|warning|failed|cancelled) break ;; esac
sleep 2
done

Keep the polling interval at a second or more so you stay well inside the rate limit.


Cancel an execution​

POST /api/v1/executions/{executionId}/cancel · scope executions:cancel

Asks Blokkio to cancel a running execution, including one waiting for approval. No body is needed. No further nodes are started. A node that is already running finishes, but its result is discarded.

curl -X POST https://api.blokkio.com/api/v1/executions/7e57ab1e-0000-4abc-9def-123456789abc/cancel \
-H "Authorization: Bearer $BLOKKIO_API_KEY"

Response 202 Accepted:

{
"executionId": "7e57ab1e-0000-4abc-9def-123456789abc",
"status": "cancelling"
}

Cancellation is asynchronous. Fetch the execution to see it reach cancelled. The cancel is recorded in the audit log as execution.cancelled, attributed to the key's creator.

Errors: 404 not-found, 409 execution-finished (already success, warning, failed or cancelled).