Skip to main content

Documentation Index

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

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

An on-call schedule defines a named rotation with a timezone. Rotation layers attached to a schedule determine who is on call at any given time. Use these endpoints to manage schedule metadata and resolve the current on-call responder.
Layers are managed separately. See Rotation Layers for endpoints that add, update, or remove rotation layers from a schedule.

GET /oncall/schedules

List all on-call schedules for your organization. Returns schedule metadata only — to include rotation layers, fetch an individual schedule with GET /oncall/schedules/{scheduleId}.

Response fields

data
object[]
required
Array of schedule objects.
curl --request GET \
  --url https://api.scaling.cloud/v1/oncall/schedules \
  --header 'Authorization: Bearer scl_live_your_api_key_here'
{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "orgId": "org_2abc123def456",
      "name": "Platform On-call",
      "description": "Primary rotation for the platform engineering team",
      "timezone": "America/New_York",
      "createdBy": "user_9xyz",
      "createdAt": "2026-01-01T09:00:00.000Z",
      "updatedAt": "2026-03-15T14:22:00.000Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "orgId": "org_2abc123def456",
      "name": "Data Infrastructure On-call",
      "description": null,
      "timezone": "America/Los_Angeles",
      "createdBy": "user_8wxy",
      "createdAt": "2026-02-10T11:30:00.000Z",
      "updatedAt": "2026-02-10T11:30:00.000Z"
    }
  ]
}

Error codes

HTTPCodeDescription
401not_authorizedMissing or invalid API key.
500server_errorUnexpected server error.

POST /oncall/schedules

Create a new on-call schedule for your organization. The name must be unique within your org.

Request body

name
string
required
Display name for the schedule. Must be unique within your organization. 1–255 characters.
description
string
Optional description of the schedule’s purpose.
timezone
string
required
IANA timezone identifier for the schedule, e.g. America/Chicago. All rotation layer handoff times are interpreted in this timezone.

Response fields

data
object
required
The created schedule object.
curl --request POST \
  --url https://api.scaling.cloud/v1/oncall/schedules \
  --header 'Authorization: Bearer scl_live_your_api_key_here' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Platform On-call",
    "description": "Primary rotation for the platform engineering team",
    "timezone": "America/New_York"
  }'
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "orgId": "org_2abc123def456",
    "name": "Platform On-call",
    "description": "Primary rotation for the platform engineering team",
    "timezone": "America/New_York",
    "createdBy": "user_9xyz",
    "createdAt": "2026-04-07T10:00:00.000Z",
    "updatedAt": "2026-04-07T10:00:00.000Z"
  }
}

Error codes

HTTPCodeDescription
400invalid_timezonetimezone is not a valid IANA timezone identifier.
401not_authorizedMissing or invalid API key.
500server_errorUnexpected server error.

GET /oncall/schedules/{scheduleId}

Retrieve a single schedule by ID, including all of its rotation layers.

Path parameters

scheduleId
string
required
The UUID of the schedule to retrieve.

Response fields

data
object
required
The schedule object with its rotation layers.
curl --request GET \
  --url https://api.scaling.cloud/v1/oncall/schedules/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  --header 'Authorization: Bearer scl_live_your_api_key_here'
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "orgId": "org_2abc123def456",
    "name": "Platform On-call",
    "description": "Primary rotation for the platform engineering team",
    "timezone": "America/New_York",
    "createdBy": "user_9xyz",
    "createdAt": "2026-01-01T09:00:00.000Z",
    "updatedAt": "2026-03-15T14:22:00.000Z",
    "layers": [
      {
        "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
        "scheduleId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "orgId": "org_2abc123def456",
        "name": "Primary rotation",
        "rotationType": "weekly",
        "rotationLengthDays": 7,
        "handoffTime": "09:00",
        "effectiveFrom": "2026-01-01T00:00:00.000Z",
        "effectiveUntil": null,
        "participantIds": ["user_aaa111", "user_bbb222", "user_ccc333"],
        "createdAt": "2026-01-01T09:05:00.000Z",
        "updatedAt": "2026-01-01T09:05:00.000Z"
      }
    ]
  }
}

Error codes

HTTPCodeDescription
401not_authorizedMissing or invalid API key.
404not_foundNo schedule found with the given ID in your organization.
500server_errorUnexpected server error.

PATCH /oncall/schedules/{scheduleId}

Update one or more fields on a schedule. All fields are optional — only the fields you include are updated.

Path parameters

scheduleId
string
required
The UUID of the schedule to update.

Request body

name
string
New display name for the schedule. Must be unique within your organization. 1–255 characters.
description
string | null
Updated description. Pass null to clear the description.
timezone
string
New IANA timezone identifier. Changing the timezone affects how all existing rotation layer handoff times are interpreted.

Response fields

data
object
required
The updated schedule object (metadata only — does not include layers).
curl --request PATCH \
  --url https://api.scaling.cloud/v1/oncall/schedules/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  --header 'Authorization: Bearer scl_live_your_api_key_here' \
  --header 'Content-Type: application/json' \
  --data '{
    "description": "Primary rotation — platform and infrastructure teams",
    "timezone": "America/Chicago"
  }'
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "orgId": "org_2abc123def456",
    "name": "Platform On-call",
    "description": "Primary rotation — platform and infrastructure teams",
    "timezone": "America/Chicago",
    "createdBy": "user_9xyz",
    "createdAt": "2026-01-01T09:00:00.000Z",
    "updatedAt": "2026-04-07T10:30:00.000Z"
  }
}

Error codes

HTTPCodeDescription
400invalid_timezonetimezone is not a valid IANA timezone identifier.
401not_authorizedMissing or invalid API key.
404not_foundNo schedule found with the given ID in your organization.
500server_errorUnexpected server error.

DELETE /oncall/schedules/{scheduleId}

Delete a schedule and all of its rotation layers. This action is permanent and cannot be undone.

Path parameters

scheduleId
string
required
The UUID of the schedule to delete.

Response fields

success
boolean
required
true when the schedule was deleted.
curl --request DELETE \
  --url https://api.scaling.cloud/v1/oncall/schedules/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  --header 'Authorization: Bearer scl_live_your_api_key_here'
{
  "success": true
}

Error codes

HTTPCodeDescription
401not_authorizedMissing or invalid API key.
404not_foundNo schedule found with the given ID in your organization.
500server_errorUnexpected server error.

GET /oncall/schedules/{scheduleId}/resolve

Resolve who is currently on call for a schedule. Returns three views in one response: the Schedule Owner (a single user for Incident.ownerId), the Paging Targets (the full set of users an escalation policy targeting this schedule would page), and the Current On-call View (a richer, position-ordered breakdown including override provenance). By default this returns the resolution at the current time. Pass the optional at query parameter to resolve at a specific moment. The Schedule Owner is the lowest-positioned currently-active rotation layer’s resolved participant — with the schedule’s active override applied if one is in effect. If position 0 is between effective windows, owner resolution falls through to the next-lowest position.

Path parameters

scheduleId
string
required
The UUID of the schedule to query.

Query parameters

at
string
ISO 8601 datetime to resolve on-call for. Defaults to the current server time if omitted. Example: 2026-06-15T14:00:00.000Z.

Response fields

data
object
required
The on-call resolution result.
curl --request GET \
  --url https://api.scaling.cloud/v1/oncall/schedules/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resolve \
  --header 'Authorization: Bearer scl_live_your_api_key_here'
{
  "data": {
    "owner": {
      "user": { "id": "user_bbb222", "firstName": "Alice", "lastName": "Chen", "email": "alice@acme.io" }
    },
    "pagingTargets": [
      { "user": { "id": "user_bbb222", "firstName": "Alice", "lastName": "Chen", "email": "alice@acme.io" } },
      { "user": { "id": "user_ccc333", "firstName": "Bob", "lastName": "Martinez", "email": "bob@acme.io" } }
    ],
    "currentOncallView": {
      "scheduleId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resolvedAt": "2026-04-07T10:00:00.000Z",
      "owner": {
        "user": { "id": "user_bbb222", "firstName": "Alice", "lastName": "Chen", "email": "alice@acme.io" }
      },
      "entries": [
        {
          "rotationLayerId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
          "rotationLayerName": "Primary",
          "position": 0,
          "user": { "id": "user_bbb222", "firstName": "Alice", "lastName": "Chen", "email": "alice@acme.io" },
          "source": "rotation"
        },
        {
          "rotationLayerId": "d4e5f6a7-b8c9-0123-defa-2345678901234",
          "rotationLayerName": "Secondary",
          "position": 1,
          "user": { "id": "user_ccc333", "firstName": "Bob", "lastName": "Martinez", "email": "bob@acme.io" },
          "source": "rotation"
        }
      ]
    }
  }
}

Error codes

HTTPCodeDescription
401not_authorizedMissing or invalid API key.
404not_foundNo schedule found with the given ID in your organization.
500server_errorUnexpected server error.