Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Trigger a workflow run

Accepts an optional JSON payload up to 1 MB. Inactive workflows return WORKFLOW_INACTIVE.

POST/api/v2/workflows/{workflowId}/trigger
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Path parameters
workflowIdstringrequired

Public workflow identifier.

matches ^wfl_[A-Za-z0-9_-]{21}$
Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Request body
requiredapplication/json
payloadany

Any JSON value whose serialized form is at most 1 MB.

runIdstring

Existing run in this API key environment for workflow spans.

max length 80
parentSpanIdstring
max length 80
Responses
202

Workflow run accepted for asynchronous execution.

successbooleanrequired
Allowed:true
dataobjectrequired
Show properties
runIdstringrequired
matches ^wfr_[A-Za-z0-9_-]{21}$
workflowIdstringrequired
matches ^wfl_[A-Za-z0-9_-]{21}$
statusstringrequired
Allowed:pending
createdAtstring<date-time>required
400

Bad Request - Invalid input data

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.anlyon.com/api/v2/workflows/string/trigger' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "payload": null,
  "runId": "string",
  "parentSpanId": "string"
}'
Response
{
  "success": true,
  "data": {
    "runId": "string",
    "workflowId": "string",
    "status": "pending",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}