Workflows API
List, get and runs
All three endpoints require the read:workflows scope (or *).
GET /api/v1/workflows
Every workflow in the workspace, newest first. Not paginated.
| Parameter | Description |
|---|---|
entity | Only this record type: LEAD, CONTACT, DEAL, EMAIL, TASK |
trigger | Only this trigger |
active | true or false |
GET /api/v1/workflows?entity=lead&active=true HTTP/1.1
Host: agentlyleads.com
Authorization: Bearer alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{ "workflows": [ { "id": "cmq5wflo0alk34567890", "name": "Round-robin web leads", "entity": "LEAD", "trigger": "CREATED", "active": true, "...": "..." } ] }GET /api/v1/workflows/{id}
Returns { "workflow": { ... } }, or 404 with { "error": "Workflow not found." }.
GET /api/v1/workflows/{id}/runs
What the workflow actually did, one row per action run, newest first. We keep the last 100 runs per workflow.
| Parameter | Description |
|---|---|
limit | 1 to 100, default 50 |
status | OK, SKIPPED or ERROR |
{
"runs": [
{
"id": "cmq6run00alk34567890",
"recordId": "cmq2lead0alk34567891",
"status": "SKIPPED",
"detail": "Record already has an owner.",
"at": "2026-09-27T14:02:00.000Z"
}
]
}detail says why an action was skipped or what went wrong. A failing action never blocks the change that triggered it.