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

Create a workflow

Define the callback endpoint used to execute runs. Callback and failure URLs are validated against the platform SSRF blocklist.

POST/api/v2/workflows
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.

Header parameters
X-Request-Idstring

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

max length 128
Request body
requiredapplication/json
namestringrequired
min length 1 · max length 100
urlstring<uri>required
methodstring
default: "POST"
Allowed:GETPOSTPUTPATCHDELETE
retriesinteger
min 0 · max 10 · default: 3
failureUrlstring<uri>
Responses
201

Public workflow definition returned.

successbooleanrequired
Allowed:true
dataWorkflowrequired
Show properties
workflowIdstringrequired
matches ^wfl_[A-Za-z0-9_-]{21}$
namestringrequired
urlstring<uri>required
methodstringrequired
Allowed:GETPOSTPUTPATCHDELETE
retriesintegerrequired
min 0
failureUrlstring<uri> | nullrequired
isActivebooleanrequired
createdAtstring<date-time>required
updatedAtstring<date-time>
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
402

Payment Required - Usage quota exceeded

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
409

The request conflicts with current resource state or a concurrent decision.

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' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "url": "http://example.com",
  "method": "GET",
  "retries": 3,
  "failureUrl": "http://example.com"
}'
Response
{
  "success": true,
  "data": {
    "workflowId": "string",
    "name": "string",
    "url": "http://example.com",
    "method": "GET",
    "retries": 0,
    "failureUrl": "http://example.com",
    "isActive": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}