Skip to main content
PATCH
/
schedules
/
{schedule_id}
Update a schedule
curl --request PATCH \
  --url https://api.shiftkeeper.io/schedules/{schedule_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "layers": [
    {
      "name": "<string>",
      "rotation_start": "2023-11-07T05:31:56Z",
      "concurrent_oncall_users": 2,
      "user_references": [
        {
          "type": "email",
          "value": "[email protected]"
        }
      ],
      "shift_length": {
        "amount": 2,
        "unit": "hours"
      },
      "restriction_intervals": [
        {
          "day": "monday",
          "from": "<string>",
          "to": "<string>"
        }
      ]
    }
  ],
  "team_ids": [
    "<string>"
  ]
}
'
{
  "schedule": {
    "name": "<string>",
    "time_zone": "<string>",
    "layers": [
      {
        "name": "<string>",
        "rotation_start": "2023-11-07T05:31:56Z",
        "concurrent_oncall_users": 2,
        "users": [
          {
            "id": "<string>",
            "name": "<string>",
            "email": "[email protected]",
            "role": "owner",
            "seat": "viewer",
            "time_zone": "<string>",
            "slack_id": "<string>"
          }
        ],
        "shift_length": {
          "amount": 2,
          "unit": "hours"
        },
        "restriction_intervals": [
          {
            "day": "monday",
            "from": "<string>",
            "to": "<string>"
          }
        ]
      }
    ],
    "teams": [
      {
        "id": "<string>",
        "name": "<string>",
        "description": "<string>"
      }
    ],
    "current_revision": 1,
    "current_revision_valid_from": "2023-11-07T05:31:56Z",
    "users": [
      {
        "id": "<string>",
        "name": "<string>",
        "email": "[email protected]",
        "role": "owner",
        "seat": "viewer",
        "time_zone": "<string>",
        "slack_id": "<string>"
      }
    ],
    "description": "<string>",
    "current_oncall_shift": {
      "users": [
        {
          "id": "<string>",
          "name": "<string>",
          "email": "[email protected]",
          "role": "owner",
          "seat": "viewer",
          "time_zone": "<string>",
          "slack_id": "<string>"
        }
      ],
      "start": "2023-11-07T05:31:56Z",
      "end": "2023-11-07T05:31:56Z"
    },
    "next_oncall_shift": {
      "users": [
        {
          "id": "<string>",
          "name": "<string>",
          "email": "[email protected]",
          "role": "owner",
          "seat": "viewer",
          "time_zone": "<string>",
          "slack_id": "<string>"
        }
      ],
      "start": "2023-11-07T05:31:56Z",
      "end": "2023-11-07T05:31:56Z"
    }
  }
}

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 string length: 200
layers
object[]

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

Required array length: 1 element
team_ids
string[]

The teams to link to the schedule.

Maximum array length: 10

Response

Default Response

schedule
object
required