Skip to main content
POST
/
schedule
/
create
Create schedule
curl --request POST \
  --url 'https://api.flashcat.cloud/schedule/create?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "schedule_name": "Production On-Call",
  "description": "Primary on-call rotation for the production team",
  "team_id": 4291079133131,
  "layers": [
    {
      "layer_name": "Layer 1",
      "name": "Layer 1",
      "mode": 0,
      "weight": 0,
      "hidden": 0,
      "groups": [
        {
          "group_name": "A",
          "name": "A",
          "members": [
            {
              "role_id": 0,
              "person_ids": [
                2451002751131
              ]
            }
          ],
          "start": 0,
          "end": 0
        },
        {
          "group_name": "B",
          "name": "B",
          "members": [
            {
              "role_id": 0,
              "person_ids": [
                2476123212131
              ]
            }
          ],
          "start": 0,
          "end": 0
        }
      ],
      "rotation_unit": "day",
      "rotation_value": 1,
      "rotation_duration": 86400,
      "handoff_time": 0,
      "enable_time": 1712000000,
      "expire_time": 0,
      "restrict_mode": 0,
      "restrict_start": 0,
      "restrict_end": 0,
      "restrict_periods": [],
      "day_mask": {
        "repeat": [
          1,
          2,
          3,
          4,
          5
        ]
      },
      "fair_rotation": false,
      "mask_continuous_enabled": false
    }
  ],
  "notify": {
    "advance_in_time": 300,
    "fixed_time": null,
    "by": {
      "follow_preference": true,
      "personal_channels": null
    },
    "webhooks": null
  }
}
'
{
  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
  "data": {
    "schedule_id": 6294534917601
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.flashcat.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Restrictions

AspectValue
Rate limits1,000 requests/minute; 50 requests/second per account
PermissionsSchedules Manage (on-call)

Authorizations

app_key
string
query
required

App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json

Schedule create/update/preview request body. The server accepts the same shape as the schedule detail model; only the key fields are listed here. For update, set schedule_id. For preview, start and end are required.

schedule_id
integer<int64>

Schedule ID. Required on update.

schedule_name
string

Schedule display name. Max 40 characters.

Maximum string length: 40
name
string

Legacy schedule name field. Used when schedule_name is empty.

Maximum string length: 40
description
string

Schedule description. Max 500 characters.

Maximum string length: 500
team_id
integer<int64>

Owning team ID.

layers
object[]

Rotation layers.

notify
object

Notification configuration attached to a schedule.

start
integer<int64>

Preview window start (Unix seconds, 10 digits). Required for /schedule/preview.

end
integer<int64>

Preview window end (Unix seconds, 10 digits). Required for /schedule/preview. Max 45 days after start.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
required

Schedule ID response returned after create.