Start runs from CI, manage events and servers, and read logs.
The REST API is small on purpose. Most programmatic work, including everything about workflows except starting a run, goes through MCP. Paths on this page are relative to your instance, such as https://cronium.example.com.
Every route on this page needs an API token. Each token belongs to the account that created it and carries a scope that limits what it can reach.
mcp scope, turn on Limit to MCP. Otherwise it gets the full scope.full token can use every route on this page.mcp token can start runs, manage events, and list servers. It cannot read logs or use the other server routes, and it sees env var keys without their values.Send it in the Authorization header:
import requests
response = requests.get(
"https://cronium.example.com/api/events",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
)
response.raise_for_status()
print(response.json())These two routes start a run and answer as soon as it is queued. A 202 means the run is on its way, not that it succeeded.
Retry-After header. The event route shares its budget with running events in the app.To fail a CI job when the run fails, follow its log until it finishes. Reading logs needs a full token. If your job only starts the run, an mcp token is enough.
set -euo pipefail
# Queue the run. --fail turns any 4xx or 5xx response into a failed step.
# Don't add --retry here: a retried request can start a second run.
LOG_ID=$(curl --silent --show-error --fail -X POST \
-H "Authorization: Bearer $CRONIUM_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"input\": {\"commit\": \"$GITHUB_SHA\"}}" \
https://cronium.example.com/api/events/42/execute | jq -r .logId)
# Wait up to 30 minutes for it to finish, because a run nothing picks up
# stays PENDING. Set this above the event's timeout. --retry rides out a
# server restart.
DEADLINE=$((SECONDS + 1800))
while ((SECONDS < DEADLINE)); do
STATUS=$(curl --silent --show-error --fail --retry 5 --retry-connrefused \
-H "Authorization: Bearer $CRONIUM_TOKEN" \
"https://cronium.example.com/api/logs/$LOG_ID" | jq -r .status)
case "$STATUS" in
PENDING | RUNNING) sleep 5 ;;
SUCCESS) exit 0 ;;
*) echo "Run finished with status $STATUS" >&2; exit 1 ;;
esac
done
echo "Run $LOG_ID had not finished after 30 minutes" >&2
exit 1REST has no route for the status of a workflow run. Pass the executionId to the get_execution MCP tool, or read each step's log with GET /api/logs?workflowId={id}.
Each run writes a log. You can only read the logs of your own events. Sharing an event does not share its logs.
Credentials are write-only. Responses never contain an SSH key or password, only hasPrivateKey and hasPassword.
Adding a server, or giving one a new key, connects to it first. Each account can have 8 such connections under way at once, counting its server and tool checks in the app, with up to 64 more waiting their turn for up to 15 seconds, and can start 60 a minute. Past that the response is a 429 that says which limit was reached, with a Retry-After header for the minute.
There are no REST routes for these. The same API tokens work with the MCP server, whose tools cover them:
list_workflows, get_workflow, create_workflow, update_workflow, delete_workflowget_executions, get_executioncreate_workflow_bundleUser variables have no API. Manage them under Settings in the Variables tab, and read them from scripts with the runtime helpers.
Responses are plain JSON: the resource itself, or an array from a list route. There is no wrapper around them. Times are ISO 8601 in UTC. The examples show the fields most clients read, and the real responses may include more.
An error has an error message:
{
"error": "Access denied"
}A body that fails validation adds details, with field errors under the field's name and request-wide errors under _errors. Unknown fields are rejected rather than ignored.
{
"error": "Validation failed",
"details": {
"_errors": [
"Unrecognized key: \"script\""
],
"timeoutValue": {
"_errors": [
"Too small: expected number to be >=1"
]
}
}
}A path that does not exist under /api answers with:
{
"error": "Not Found",
"message": "API endpoint '/api/does-not-exist' does not exist",
"statusCode": 404,
"timestamp": "2026-11-04T16:15:00.000Z"
}