PATCH
/
schedules
/
{schedule_id}
curl --request PATCH \
  --url https://api.shiftkeeper.io/schedules/{schedule_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "Incident responders",
  "team_ids": [
    "tea_VJ4sYEOOXVvJBXqFjRzpm"
  ]
}'
{
  "schedule": {
    "name": "Incident responders",
    "description": "Incident responders",
    "time_zone": "Europe/Berlin",
    "layers": [
      {
        "name": "Main",
        "rotation_start": "2024-01-01T00:00:00Z",
        "concurrent_oncall_users": 1,
        "users": [
          {
            "id": "usr_bq7CmsOKLmkMeZkUUu1hy",
            "name": "Rick",
            "email": "rick@example.org",
            "time_zone": "Europe/Paris",
            "role": "owner",
            "seat": "member",
            "slack_id": "U082KENSEQ3"
          },
          {
            "id": "usr_C0GwCFdk0I4pBMRny4qYV",
            "name": "Dena",
            "email": "dena@example.org",
            "role": "standard",
            "seat": "member",
            "slack_id": "U082GMAFR1T"
          },
          {
            "id": "usr_YlxrjoB1JqUsollScfFYT",
            "name": "Lily",
            "email": "lily@example.org",
            "time_zone": "America/New_York",
            "role": "standard",
            "seat": "viewer",
            "slack_id": "U0529FWNCG2"
          }
        ],
        "shift_length": {
          "amount": 1,
          "unit": "weeks"
        },
        "restriction_intervals": []
      }
    ],
    "current_revision": 1,
    "current_revision_valid_from": "2024-12-01T00:00:00Z",
    "current_oncall_shift": {
      "users": [
        {
          "id": "usr_bq7CmsOKLmkMeZkUUu1hy",
          "name": "Rick",
          "email": "rick@example.org",
          "time_zone": "Europe/Paris",
          "role": "owner",
          "seat": "member",
          "slack_id": "U082KENSEQ3"
        }
      ],
      "start": "2024-01-01T00:00:00Z",
      "end": "2024-01-01T01:00:00Z"
    },
    "next_oncall_shift": {
      "users": [
        {
          "id": "usr_C0GwCFdk0I4pBMRny4qYV",
          "name": "Dena",
          "email": "dena@example.org",
          "role": "standard",
          "seat": "member",
          "slack_id": "U082GMAFR1T"
        }
      ],
      "start": "2024-01-01T01:00:00Z",
      "end": "2024-01-01T02:00:00Z"
    },
    "users": [
      {
        "id": "usr_bq7CmsOKLmkMeZkUUu1hy",
        "name": "Rick",
        "email": "rick@example.org",
        "time_zone": "Europe/Paris",
        "role": "owner",
        "seat": "member",
        "slack_id": "U082KENSEQ3"
      },
      {
        "id": "usr_C0GwCFdk0I4pBMRny4qYV",
        "name": "Dena",
        "email": "dena@example.org",
        "role": "standard",
        "seat": "member",
        "slack_id": "U082GMAFR1T"
      },
      {
        "id": "usr_YlxrjoB1JqUsollScfFYT",
        "name": "Lily",
        "email": "lily@example.org",
        "time_zone": "America/New_York",
        "role": "standard",
        "seat": "viewer",
        "slack_id": "U0529FWNCG2"
      }
    ],
    "teams": [
      {
        "id": "tea_VJ4sYEOOXVvJBXqFjRzpm",
        "name": "Payments",
        "description": "All about payments and billing"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

Enter your API key which starts with 'keeper_'

Path Parameters

schedule_id
string
required

The ID of the schedule.

Body

application/json
name
string

The name of the schedule.

Required string length: 1 - 60
description
string

The description of the schedule.

Maximum length: 200
layers
object[]

The layers of the schedule. Currently, schedules can have only one layer.

team_ids
string[]

The teams to link to the schedule.

Response

200
application/json
Default Response
schedule
object
required