curl --request POST \
--url https://api.shiftkeeper.io/schedules/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"time_zone": "<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>"
],
"description": "<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"
}
}
}Create a new schedule.
curl --request POST \
--url https://api.shiftkeeper.io/schedules/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"time_zone": "<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>"
],
"description": "<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"
}
}
}Enter your API key which starts with 'keeper_'
The name of the schedule.
1 - 60The time zone of the schedule. Must be a valid IANA time zone. Note that the time zone cannot be changed after the schedule is created.
The layers of the schedule. Currently, schedules can have only one layer.
1 elementShow child attributes
The name of the schedule layer.
1 - 60The start date and time of the rotation. ISO 8601 format, UTC timezone.
The number of concurrent on-call users for this layer.
1 <= x <= 4The rotation users in the schedule layer. The order of the users in the array determines the round-robin rotation order. A user can appear multiple times in the rotation.
50Determines the time intervals that the layer is restricted to. Useful if you want to limit the on-call hours to specific times, e.g., only during business hours. If not provided, the layer is unrestricted and covers everyday of the week.
35Show child attributes
The day of the restriction interval.
monday, tuesday, wednesday, thursday, friday, saturday, sunday The start time of the restriction interval.
The end time of the restriction interval.
The teams to link to the schedule.
10The description of the schedule.
200Default Response
Show child attributes
The name of the schedule.
1 - 60The IANA time zone of the schedule.
The layers of the schedule.
Show child attributes
The name of the schedule layer.
1 - 60The start date and time of the rotation. ISO 8601 format, UTC timezone.
The number of concurrent on-call users for this layer.
1 <= x <= 4The rotation users in the schedule layer. The order of the users in the array determines the round-robin rotation order. A user can appear multiple times in the rotation.
Show child attributes
The ID of the user.
The name of the user.
The email of the user.
The preferred time zone of the user. If not set, the organization's time zone will be used.
The Slack ID of the user.
Determines the time intervals that the layer is restricted to. Useful if you want to limit the on-call hours to specific times, e.g., only during business hours. If not provided, the layer is unrestricted and covers everyday of the week.
35Show child attributes
The day of the restriction interval.
monday, tuesday, wednesday, thursday, friday, saturday, sunday The start time of the restriction interval.
The end time of the restriction interval.
The current revision of the schedule. A new revision is created every time the schedule layer configuration is changed.
x >= 0The timestamp that marks the start of the current revision.
The users in the schedule. The order does not necessarily match rotation order.
Show child attributes
The ID of the user.
The name of the user.
The email of the user.
The preferred time zone of the user. If not set, the organization's time zone will be used.
The Slack ID of the user.
The description of the schedule.
200The current on-call shift for the schedule.
Show child attributes
The users on-call for this shift.
Show child attributes
The ID of the user.
The name of the user.
The email of the user.
The preferred time zone of the user. If not set, the organization's time zone will be used.
The Slack ID of the user.
The start time of the on-call shift.
The end time of the on-call shift.
The next on-call shift for the schedule.
Show child attributes
The users on-call for this shift.
Show child attributes
The ID of the user.
The name of the user.
The email of the user.
The preferred time zone of the user. If not set, the organization's time zone will be used.
The Slack ID of the user.
The start time of the on-call shift.
The end time of the on-call shift.