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

Create a new schedule

Create a recurring schedule (cron job) to send messages at specified intervals

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

Human-readable name for the schedule

min length 1 · max length 100
cronExpressionstringrequired

Cron expression defining the schedule

timezonestring

Timezone for the cron schedule

default: "UTC"
urlstring<uri>required

Destination URL

methodstring
default: "POST"
Allowed:GETPOSTPUTPATCHDELETE
headersobject
bodyany

Request body

Responses
200

Schedule created successfully

successboolean
dataPublicSchedule
Show properties
scheduleIdstringrequired
matches ^sch_
namestringrequired
cronExpressionstringrequired
timezonestring | nullrequired
urlstring<uri>required
methodstringrequired
Allowed:GETPOSTPUTPATCHDELETE
headersobject | nullrequired

Delivery headers with sensitive values redacted.

bodyany | nullrequired

Request body

isActivebooleanrequired
isPausedbooleanrequired
nextRunAtstring<date-time> | nullrequired
lastRunAtstring<date-time> | nullrequired
lastStatusstring | nullrequired
createdAtstring<date-time>required
updatedAtstring<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
402

Payment Required - Feature not available on current plan

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
429

Too Many Requests - either the request rate limit, or the plan's cap on how many of this resource may exist. The code distinguishes them: RATE_LIMIT_EXCEEDED clears on its own, QUOTA_EXCEEDED does not until you remove one or upgrade.

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/schedules' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Daily Report",
  "cronExpression": "0 9 * * *",
  "timezone": "America/New_York",
  "url": "https://example.com/webhook",
  "method": "POST",
  "body": {
    "type": "daily_report"
  }
}'
Response
{
  "success": true,
  "data": {
    "scheduleId": "sch_1234567890abcdef",
    "name": "Daily Report",
    "cronExpression": "0 9 * * *",
    "timezone": "UTC",
    "url": "https://example.com/webhook",
    "method": "POST",
    "headers": {},
    "body": {
      "report": "daily"
    },
    "isActive": true,
    "isPaused": false,
    "nextRunAt": "2026-07-14T09:00:00Z",
    "lastRunAt": null,
    "lastStatus": null,
    "createdAt": "2026-07-13T12:00:00Z",
    "updatedAt": "2026-07-13T12:00:00Z"
  }
}