Skip to main content

Public API

The public API lets your own code work with one Blokkio project. You can list workflows, run them (and optionally wait for the result), list and inspect executions, and cancel running executions.

  • Base URL: https://api.blokkio.com/api/v1 (the /api/v1 path on the main API host).
  • Format: JSON in and out, with camelCase property names.
  • Auth: project API keys (bk_live_…).
  • Reference: Endpoints. There is also a small TypeScript client.
curl https://api.blokkio.com/api/v1/workflows \
-H "Authorization: Bearer $BLOKKIO_API_KEY"

Authentication​

Every /api/v1 request needs a project API key. Create one in the app under Settings → API keys (see API keys). Keys look like bk_live_ followed by 40 characters. The full key is shown once, when you create it. Blokkio stores only a hash, so copy the key straight into your secret store.

Send the key in either of these headers:

Authorization: Bearer bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-Api-Key: bk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Things to know about keys:

  • A key belongs to one project. The project comes from the key, so API routes never include a project id.
  • The key's scopes decide what it can do; the creator's role is not re-checked on each request.
  • The API acts on behalf of the member who created the key. If that member is removed from the workspace, the key stops working.
  • A key can have an expiry date (1 to 3650 days) or never expire. Revoked and expired keys are rejected with 401.
  • A project can have at most 50 active keys.
  • /api/v1 accepts only API keys. Your app sign-in (cookies or app tokens) does not work here.

Scopes​

Each key carries one or more scopes. A request whose key lacks the required scope gets 403 with the problem type insufficient-scope.

ScopeAllows
workflows:readGET /workflows, GET /workflows/{workflowId}, GET /workflows/{workflowId}/export
workflows:writePOST /workflows/import
workflows:executePOST /workflows/{workflowId}/execute
executions:readGET /executions, GET /executions/{executionId}
executions:cancelPOST /executions/{executionId}/cancel

Give each key only the scopes it needs. For example, a backend that only starts a workflow needs workflows:execute, plus executions:read if it checks results later.

Pagination​

List endpoints use cursor pagination:

Query parameterDefaultDescription
limit25Items per page. Values outside 1–100 are clamped to that range.
cursorThe nextCursor value from the previous page. Leave it out for the first page.

Lists are sorted newest first and have this shape:

{
"data": [ { "id": "…" } ],
"nextCursor": "NjM4NjcxMjM0NTY3ODkwMTIzOjNmYjQ…"
}

nextCursor is null on the last page. Treat the cursor as opaque. A malformed cursor returns 400 with an error on the cursor field.

Errors​

Errors use RFC 9457 problem details with the content type application/problem+json. The type field is a stable, machine-readable code. Most error responses also carry a traceId. Include it when you contact support.

{
"type": "workflow-not-published",
"title": "Conflict",
"status": 409,
"detail": "The workflow has no published revision. Publish it before executing it through the API.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}

Validation errors (400) list problems per field under errors:

{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": { "timeout": ["'timeout' must be between 1 and 60 seconds."] }
}
StatusWhen
200Success. Also returned by execute?wait=true when the run finished within the timeout.
202Accepted: an execution was queued, is still running after the wait, or a cancel was requested.
400Validation failed (data is not an object, bad timeout, unknown status filter, invalid cursor …).
401Missing, unknown, revoked or expired key, or the key's creator no longer has access (type unauthorized).
402The plan's execution quota is used up (type quota-exceeded).
403The key lacks the scope for this endpoint (type insufficient-scope).
404The workflow or execution doesn't exist in the key's project (type not-found).
409The request conflicts with the current state. See the type values below.
429Rate limit exceeded.
500Unexpected server error. No internal details are returned; use the traceId.

409 problem types:

typeMeaning
workflow-not-publishedThe workflow has never been published. The API only runs published revisions.
workflow-suspendedThe workflow is suspended because the project exceeds the current plan's limits.
workflow-disabledThe workflow is paused. Resume it in the app first.
no-api-triggerThe workflow has no Manual or Webhook trigger and no triggerId was sent.
execution-finishedYou tried to cancel an execution that has already finished.

Rate limits​

Requests to /api/v1 are limited per API key with a token bucket: 120 requests per minute, refilled every minute, no queueing. Blokkio also applies a general limit to all traffic from one client IP address. Requests over either limit get 429 with a problem details body, and usually a Retry-After header (seconds).

If you hit 429, wait for Retry-After and retry. For large result sets, use limit=100 to make fewer requests.

Request size​

Request bodies are limited to 10 MB. If you need to pass large files, upload them somewhere the workflow can fetch them from and send a URL in data.

OpenAPI document​

The machine-readable description of the API is served without authentication at:

https://api.blokkio.com/openapi/v1.json

Use it to generate a client in your language, or import it into Postman or Insomnia. It describes only the /api/v1 endpoints.

An interactive reference UI is served at /api/docs when it is enabled on the server. It renders the same OpenAPI document.

Typical flow​

  1. Create a key with the scopes you need under Settings → API keys.
  2. Find the workflow id with GET /api/v1/workflows, or copy it from the workflow URL in the app.
  3. Make sure the workflow is published and has a Manual or Webhook trigger.
  4. Call POST /api/v1/workflows/{workflowId}/execute. Add ?wait=true for short workflows if you want the result in the same response.
  5. Otherwise poll GET /api/v1/executions/{executionId} until status is final, or open the run in Logs.

See Endpoints for every request and response.