Skip to documentation
Documentation

Reference

Runs API

Start a run and retrieve its state using the public HTTP API.

stable API Updated Aug 15, 2026

Authentication

Send a project API key as a bearer token. Use server-side keys only; never embed them in browser or mobile applications.

Authorization: Bearer cmp_live_your_key
Content-Type: application/json

Start a run

POST /v1/workflows/{workflow}/runs

curl https://api.compaos.com/v1/workflows/qualify-lead/runs \
  --request POST \
  --header "Authorization: Bearer $COMPAOS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"input":{"email":"ana@example.com","company":"Acme"}}'

A successful request returns 202 Accepted with a run identifier and its initial state.

{
  "id": "run_01J7Q9N8S3",
  "status": "queued",
  "workflow": "qualify-lead"
}

Get a run

GET /v1/runs/{run_id} returns the current status and output when complete. Treat unrecognized response fields as forward-compatible additions.

Errors

Errors use a stable code, a human-readable message, and a request identifier. Retry 429 and 5xx responses with backoff; do not retry validation or authentication failures unchanged.