TurnShift shift scheduling API

Read and change your schedules, assignments, rotations and teams from your own code with the REST API, or from Claude, ChatGPT and other AI assistants with the MCP server.

Overview

The TurnShift API lets you integrate shift scheduling into your existing workflows. Build custom integrations, automate repetitive tasks, or sync TurnShift with your internal tools.

What you can do with the API:

  • Manage shifts — Create, update, and delete shifts programmatically
  • Automate bookings — Assign team members to shifts based on your own logic
  • Sync teams — Keep your TurnShift teams in sync with your HR system
  • Build dashboards — Pull schedule data into your own reporting tools
  • Integrate with Slack/Discord — Create custom bots that interact with your schedules

All endpoints return JSON and use standard HTTP methods.Read = read-onlyWrite = modifies data

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer <your-api-token>

MCP server

Add the TurnShift MCP server to Claude, ChatGPT, Cursor or any MCP client with one URL. The client signs you in with OAuth, then acts as you: a member can only assign themselves on schedules that are not open. Clients without OAuth can send your personal token from Settings, API, or the organization token, which has admin rights.

POSThttps://turnshift.app/api/mcp

Send JSON-RPC requests to this Streamable HTTP endpoint.

Without OAuth, send a token with every request:

Authorization: Bearer <your-api-token>

Tools

  • list_schedules: list schedules and their assigned teams. No inputs.
  • get_schedule: get one schedule. Input: scheduleId.
  • list_team_members: list a team's members. Input: teamId.
  • list_schedule_members: list the members of a schedule's teams. Input: scheduleId.
  • get_bookings: list assignments in a date range. Inputs: scheduleId, startDate, endDate, and optional email. Its changedDays lists the days whose people needed was changed for that date only.
  • who_is_on_shift: show people on shift at an instant. Optional input: at.
  • get_report: each person's shifts, days and hours over a period, split into weekday, weekend and night hours. Inputs: startDate, endDate, and optional scheduleId.
  • assign: assign a person to one date or a filtered date range. Inputs: scheduleId, email, date or startDate and endDate, and optional weekdays.
  • unassign: remove an assignment with the same inputs as assign.
  • unassign_everyone: remove everyone assigned to one date or a filtered date range, for managers and admins. Inputs: scheduleId, date or startDate and endDate, and optional weekdays.
  • auto_assign: fill a schedule's open days, spread fairly across its teams. Inputs: scheduleId, startDate, endDate.
  • get_rotation, start_rotation, change_rotation and stop_rotation: read and run a schedule's rotation. People are named by email, in the order they take turns. change_rotation takes dryRun to preview whose turns move.
  • create_schedule: create a schedule ready to use, like New schedule in the app: its hours, its Slack channel by name (slackChannel, like #support), the people by email (they join the first team given, else a new team named after it), existing teams, and an optional rotation when people take turns. Managers and admins only.
  • ask_to_book: ask everyone on a schedule who still has shifts to book to book them now, the reminder that goes out before each month or week. Managers and admins only.
  • duplicate_schedule: copy a schedule to start a similar one, without its assignments or rotation. The copy is off until update_schedule turns it on. Managers and admins only.
  • import_team_calendar: bring a free team calendar (turnshift.app/tools/team-calendar) in by its link: its schedules, its people by name and who is on each day for the next 90 days. Managers and admins only.
  • import_opsgenie: bring Opsgenie's on-call schedules in with an Opsgenie API key: each rotation becomes a schedule with its hours, its people matched by email and the same person on the same days. Ask for a dry run first. Managers and admins only.
  • import_pagerduty: the same from PagerDuty, with a read-only PagerDuty API key: each layer of a schedule becomes a schedule. Ask for a dry run first. Managers and admins only.
  • set_schedules_active: turn several schedules on or off at once, like selecting them on the Schedules list. All or nothing.
  • set_people_needed: change how many people one day of a schedule needs, or take the day off with 0.
  • set_day_hours: give one date of a schedule its own hours, or null for its usual ones back.
  • update_schedule: change a schedule's name, coverage (hours, time zone, people needed each weekday), whether it is on, its Slack channel by name, its Microsoft Teams channel, and its Slack messages, the managers' open seats warning included.
  • list_microsoft_channels: the Microsoft Teams channels a schedule can post to.
  • list_slack_channels: the Slack channels a schedule can post in, by name.
  • list_teams, add_team_member and remove_team_member: teams and who is on them. People added get a Slack message.
  • list_users and set_role: everyone with their role, and change a role (admins only).
  • add_person: add someone who is not in your Slack, by name and email (managers and admins, for the organizations trying it first).
  • sync_people and get_people_sync: read your people from Slack and Microsoft Teams now instead of at the next sync, and say who joined or left (managers and admins).
  • ask_admin: ask your organization's admins for a new role. Each admin gets one Slack message, or an email when they muted TurnShift's messages. Once a day, and only when signed in as yourself: an API token has no person behind it.
  • mute_direct_messages: mute or unmute TurnShift's Slack messages to you.
  • get_notification_settings and set_notification_setting: where you get each kind of notification (changes to your shifts, reminders, open seats), on Slack, Teams or email. Only when signed in as yourself.
  • set_slack_language: the language of TurnShift's Slack messages for the organization.
  • list_invoices: your TurnShift invoices with links to view and download them.
  • list_share_links, share_schedules and turn_off_share_link: share schedules with anyone who has the link, with or without a password. Optional inputs: scheduleIds and password.
  • list_coverage_requests, request_coverage, accept_coverage, decline_coverage, change_coverage_hours, change_who_covers and cancel_coverage_request: ask the team to cover your days or a few hours, cover a teammate or say you can't, pick or change who covers as a manager, or move the hours covered.
  • list_changelog: TurnShift's release notes, newest first. Optional inputs: since and limit.
  • free_holidays: the public holidays of a country or a German state for a year, with the long weekends and the bridge days. Inputs: country, and optionally region and year.
  • free_time_zones: time zones with their current UTC offset, abbreviations, main cities and next clock change. Inputs, at least one: country, zone or query.
  • free_convert_time: a time on one clock said on another, daylight saving time counted. Inputs: from, to, and optionally time and strict.

Managers and admins run auto-assign, rotations, teams and invoices, like in the app.

Example request

POST https://turnshift.app/api/mcp
Authorization: Bearer <your-api-token>
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_schedules",
    "arguments": {}
  }
}

Connect a client

In Claude, open Customize > Connectors and add a custom connector with this URL. In ChatGPT, open Plugins > + > Add custom MCP server (changes need a Business, Enterprise or Edu workspace). Then sign in to TurnShift when asked.

https://turnshift.app/api/mcp
Read the Claude.ai and ChatGPT MCP documentation

Roles and access

The token belongs to your organization, not to one person. Every request made with it has the same access as an admin: it can read and change every schedule, team and booking, including schedules that are not open. Treat it like an admin password and keep it in a secret store.

Only admins and managers can see the token in your organization settings. The member role limits what someone can do when they sign in to the dashboard, it does not limit the API token.

Admin can do everything a manager can, plus change roles.

Manager can create and edit schedules, assign anyone, and manage teams, Slack, billing and this token.

Member can book their own shifts. On an open schedule they can do everything except close it.

Quick Start

Test your API token by fetching your organization info.

curl -H "Authorization: Bearer <your-api-token>" \
  https://turnshift.app/api/v1/me

Expected response:

{
  "organization": {
    "id": 123,
    "name": "Your Organization",
    "slug": "your-org",
    "createdAt": "2024-01-01T00:00:00.000Z"
  }
}

Common Examples

Here are curl examples for the most common API operations.

GETList all teamsRead

Fetch all teams in your organization.

curl -H "Authorization: Bearer <your-api-token>" \
  https://turnshift.app/api/v1/teams
POSTAdd a user to a teamWrite

Add a team member by email. Replace :teamId with the team ID.

curl -X POST \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"user": "john@example.com"}' \
  https://turnshift.app/api/v1/teams/1/members
GETList all shiftsRead

Fetch all shifts in your organization.

curl -H "Authorization: Bearer <your-api-token>" \
  https://turnshift.app/api/v1/shifts
POSTBook a user for a shiftWrite

Assign a user to a shift on a specific date. Add ?notify=true to send a Slack notification.

curl -X POST \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"user": "john@example.com"}' \
  https://turnshift.app/api/v1/shifts/1/bookings/2024-01-15
DELETERemove a bookingWrite

Remove a user from a shift on a specific date. Add ?notify=true to send a Slack notification.

curl -X DELETE \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"user": "john@example.com"}' \
  https://turnshift.app/api/v1/shifts/1/bookings/2024-01-15

Users Read Write

List users in your organization, see their team memberships, add people by name and email and set their role.

GET/api/v1/users

List all users in your organization

Response:

{
  "users": [
    {
      "id": 1,
      "email": "john@example.com",
      "name": "John Doe",
      "timezone": "America/New_York",
      "role": "manager",
      "teams": [{ "id": 1, "name": "Support" }]
    }
  ]
}
POST/api/v1/users

Add someone by email

A person TurnShift can put on teams and schedules without a Slack account. TurnShift emails them an invite, and they sign in with a code sent to that email. timezone is optional and defaults to the one most of your people have. An email someone in the organization already has is refused with a 400. For the organizations trying it first, others get a 404.

Request:

{
  "name": "Ana Lima",
  "email": "ana@example.com",
  "timezone": "Europe/Paris"
}

Response (201):

{
  "user": {
    "id": 42,
    "email": "ana@example.com",
    "name": "Ana Lima",
    "timezone": "Europe/Paris",
    "role": "member",
    "teams": []
  }
}
POST/api/v1/users/sync

Sync people from Slack and Teams

TurnShift reads your Slack workspace and Microsoft Teams every 10 minutes. This reads them now, from whatever your organization connected, and answers at once while the sync runs. Then GET /api/v1/users/sync with the startedAt and providers it answered says when it is done and how many people joined or left since. A big workspace takes about a minute. Without Slack or Teams connected, a 400.

Response (202):

{
  "startedAt": "2026-11-30T09:24:07.000Z",
  "providers": ["slack"]
}

Then, until done is true:

curl -H "Authorization: Bearer $TURNSHIFT_TOKEN" \
  "https://turnshift.app/api/v1/users/sync?startedAt=2026-11-30T09:24:07.000Z&providers=slack"

{ "done": true, "added": 2, "removed": 0 }
PUT/api/v1/users/:userId/role

Set someone's role

:userId is a TurnShift user ID, a Slack user ID or an email address. Giving a role to a Slack person who never signed in creates their TurnShift user. The last admin cannot be demoted, promote someone else first. When a number is the TurnShift ID of one person and the Slack user ID of another, the request fails with a 409: use their email instead.

Request:

{ "role": "manager" }

Response:

{
  "user": { "id": 1, "role": "manager" }
}

Example:

curl -X PUT \
  -H "Authorization: Bearer $TURNSHIFT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"role": "manager"}' \
  "https://turnshift.app/api/v1/users/john@example.com/role"

Organization Read

Retrieve information about your organization, and set the language of its Slack messages.

GET/api/v1/me

Get organization information

Response:

{
  "organization": {
    "id": 123,
    "name": "Acme Inc",
    "slug": "acme-inc",
    "language": "en",
    "createdAt": "2024-01-01T00:00:00.000Z"
  }
}
PATCH/api/v1/me

Change the language of TurnShift's Slack messages and channel topics with { "language": "fr" }: en, fr, de or es. People who picked their own language in TurnShift keep it for their direct messages.

Shifts Read Write

Create, update, and delete shifts. Configure shift times, timezones, and notification settings.

startMessageNote is a string or null. It is optional Slack mrkdwn appended to shift start messages and can be up to 1000 characters.

GET/api/v1/shifts

List all shifts

POST/api/v1/shifts

Create a shift ready to use, with its people and how they get assigned, like New schedule in the app

Request body:

{
  "name": "Morning Support",
  "startTime": "09:00",
  "endTime": "17:00",
  "timeZone": "Europe/Paris",
  "slackChannelName": "#support",  // or "slackChannelId": 123
  "microsoftChannel": "Support crew › General",  // optional, or its id
  "numberOfShiftsToBookPerDay": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 0, "7": 0 },
  "startMessageNote": "Remember to check the runbook.",
  "users": ["john@example.com", "jane@example.com"],  // optional
  "teamIds": [3],                                     // optional
  "rotation": {                                       // optional
    "turnUnit": "week",  // or "day"
    "turnLength": 1,     // 1 to 8
    "startsOn": "2024-01-15"
  }
}

Name its Slack channel with slackChannelName, or send the slackChannelId another shift shows. For a private channel, type /invite @TurnShift in it first, or you get a 404. Both are optional: without a channel the shift posts in none, and its people still get their direct messages. notifyEmail true emails its people about their shifts too, and notifySlack false only by email, with no Slack channel to name. microsoftChannel is its Microsoft Teams channel, named Team › Channel.

The shift is on from the start. users (IDs or emails) join the first of teamIds, the existing teams put on it, or become a new team named after the shift without one (teamCreated in the answer says which). Leave out rotation for Manual (no rotation). With it, the people in users take turns in that order, as many per turn as the shift needs at a time, or the ones you list in rotation.users, who must be in users or on the teams. Everything is created together, or nothing is. People get a Slack message: their turns, or that they were added.

Response:

{
  "shift": { "id": 1, "name": "Morning Support", "active": true, ... },
  "teamId": 7,      // the new team, null without users
  "rotationId": 4   // null on Manual
}
POST/api/v1/shifts/:shiftId/remind

Ask everyone who still has shifts to book to book them now, like Ask to book in the app

The booking reminder, sent now on Slack, Teams or email. It asks for this month while more than 10 days are left in it, else next month; a shift booked weekly (bookingReminderEvery: "week") asks for this week until Wednesday, else next week. Once a day, and only for a shift that is on.

Response:

{
  "asked": 4,
  "month": "2026-12",  // or null
  "week": null         // or the Monday of the week, "2026-12-07"
}
POST/api/v1/shifts/:shiftId/duplicate

Duplicate a shift to start a similar one, like Duplicate in its settings

Request body (optional):

{
  "name": "Evening Support"  // "<name> (copy)" by default
}

The copy has the same days, hours, time zone, people needed, Slack channel, notifications and teams, and the days changed from today on. Bookings and the rotation are not copied. It is off (active: false), so it posts nothing to Slack until you turn it on with PUT /api/v1/shifts/:shiftId. A number is added to a name another shift has.

Response:

{
  "shift": { "id": 2, "name": "Morning Support (copy)", "active": false, ... },
  "teamIds": [3, 7]
}
PUT/api/v1/shifts/:shiftId/days/:date

Change how many people one day of a shift needs, or its hours that day only

Request body:

{
  "peopleNeeded": 2,      // 0 to 100
  "startTime": "08:00",   // that day's own hours, null for the usual ones
  "endTime": "12:00"
}

:date is an ISO date like 2026-11-02. 0 takes the day off, a number on a day the shift does not run adds it, and the weekday's usual number puts the day back as usual. Send either part or both: startTime and endTime give that one day its own hours (in the shift's time zone; an end before the start ends the next day, equal times run 24 hours), and its messages, reminders and reports follow them. The shift keeps its hours every other day.

Response:

{ "date": "2026-11-02", "peopleNeeded": 2, "usual": 1,
  "startTime": "08:00", "endTime": "12:00",
  "usualStartTime": "09:00", "usualEndTime": "17:00" }
POST/api/v1/team-calendars/import

Bring a free team calendar in: its schedules, people and who is on each day

Request body:

{
  "calendar": "https://turnshift.app/tools/team-calendar/aBcD1234eFgH5678",  // its link or its id
  "timezone": "Europe/Vienna"  // optional, the organization's most common one by default
}

Each shift title of the free team calendar (turnshift.app/tools/team-calendar) becomes a shift with its hours and people needed, and who is on each day is booked for the next 90 days. Turns are booked day by day, not as a rotation. Its people are added by name, without an email: they get no reminder until POST /api/v1/users adds them by the same name with an email. Someone already in the organization under the same name is used. A shift whose name is taken is left out and listed in skipped, so a second call adds nothing.

Response:

{
  "title": "Market stand",
  "schedules": [{ "id": 12, "name": "Stand" }],
  "skipped": [],
  "peopleAdded": 3,
  "truncated": false  // true when it had more than 30 schedules
}
POST/api/v1/imports/opsgenie

Bring Opsgenie's on-call schedules in: its rotations, people and who is on each day

Request body:

{
  "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",  // an Opsgenie API integration's key, used once and never stored
  "region": "eu",               // optional: "eu" for app.eu.opsgenie.com, "us" by default
  "dryRun": true,               // optional: write nothing, answer what an import would do
  "timezone": "Europe/Vienna"   // optional: for schedules in a zone TurnShift does not list, like UTC
}

Each Opsgenie rotation becomes a shift with its hours and days, and the same person on the same days: as a rotation when a day, a week or several each gives the same days, otherwise booked day by day for the next 90 days (note writtenOut). People are matched by email with the ones already in the organization. The others are added with their email and get no invite, and nobody is messaged. Disabled schedules, ended rotations and turns shorter than a day are listed in skipped with the reason, like a shift whose name is taken, so a second call adds nothing. Instead of apiKey, you can send data: what Opsgenie's GET /v2/schedules?expand=rotation and GET /v2/users answered, as { schedules, users }. TurnShift does not page anyone: alerts and escalations stay with an incident tool.

Response:

{
  "dryRun": false,
  "schedules": [
    {
      "id": 12,
      "name": "Platform_schedule",
      "timeZone": "Europe/Vienna",
      "startTime": "00:00",
      "endTime": "00:00",  // equal times: it runs all day
      "weekdays": [1, 2, 3, 4, 5, 6, 7],
      "people": ["Ana Lima", "Ben Okoro"],
      "onNow": "Ben Okoro",
      "rotation": { "turnUnit": "week", "turnLength": 1, "startsOn": "2026-12-07" },
      "notes": []
    }
  ],
  "skipped": [{ "name": "Old schedule", "reason": "disabled" }],
  "people": [{ "name": "Ben Okoro", "email": "ben@example.com", "added": true }],
  "promoApplied": false,  // true when this import put 50% off for 6 months on the subscription
  "truncated": false  // true when Opsgenie had more than 30
}
POST/api/v1/imports/pagerduty

Bring PagerDuty's on-call schedules in: its layers, people and who is on each day

Request body:

{
  "apiKey": "xxxxxxxxxxxxxxxxxxxx",  // a read-only PagerDuty REST API key, used once and never stored
  "region": "eu",               // optional: "eu" for an account on *.eu.pagerduty.com, "us" by default
  "dryRun": true,               // optional: write nothing, answer what an import would do
  "timezone": "Europe/Vienna"   // optional: for schedules in a zone TurnShift does not list, like UTC
}

Each layer of a PagerDuty schedule becomes a shift, with the same rules and the same response as the Opsgenie import above. Overrides are not read, and where PagerDuty lets a higher layer take over a lower one, both shifts keep their own person. Instead of apiKey, you can send data: { schedules, users }, with the schedule of PagerDuty's GET /schedules/{id} for each schedule and the users of GET /users.

POST/api/v1/shifts/active

Turn several shifts on or off at once, like selecting them on the Schedules list

Request body:

{
  "shiftIds": [2, 3, 4],
  "active": true  // false turns them off
}

Off keeps their bookings but posts nothing to Slack. All or nothing: an id that is not one of your shifts answers 404 and changes none. Shifts already in that state stay as they are, and changedIds lists the ones this call switched.

Response:

{
  "shifts": [{ "id": 2, "name": "Morning Support", "active": true }, ...],
  "changedIds": [2, 4]
}
GET/api/v1/shifts/:shiftId

Get shift details

Shift object:

{
  "id": 1,
  "name": "Morning Support",
  "startTime": "09:00",
  "endTime": "17:00",
  "timeZone": "Europe/Paris",
  "slackChannelId": 123,
  "startMessageNote": null
}

slackChannelId is null when the shift posts in no Slack channel: it was made without one, or its channel was deleted. Update it with slackChannelName to post in one.

PUT/api/v1/shifts/:shiftId

Update a shift

Request body:

{
  "slackChannelName": "#support-oncall",  // or "slackChannelId": 124
  "microsoftChannel": "Support crew › On-call",  // or its id, null for none
  "startMessageNote": "Remember to check the runbook.",
  "numberOfShiftsToBookPerDay": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 0, "7": 0 },
  "recurrence": null,  // or { "kind": "monthly-day", "day": 27 }
  "channelMessagesOnChangeOnly": true,
  "sendOpenSeatsWarning": true,
  "notifySlack": true,
  "notifyEmail": true,
  "freeForm": false
}

Send only the fields you change. slackChannelName moves it to another Slack channel, found by name; "slackChannelId": null takes it out of its channel, and its people still get their direct messages. numberOfShiftsToBookPerDay is the people needed each ISO weekday, Monday 1 to Sunday 7, 0 when the shift does not run. The same start and end time means all day. recurrence repeats it once a month instead of every week: { "kind": "monthly-day", "day": 27 } for the 27th (a month without that day is skipped), or { "kind": "monthly-weekday", "week": -1, "weekday": 3 } for the last Wednesday (week 1 to 4, or -1 for the last). Each of those dates needs the most people numberOfShiftsToBookPerDay asks for on any weekday; null repeats it every week. POST takes it too. freeForm is an open schedule, where members assign anyone: true unless POST sends false. sendOpenSeatsWarning sends the schedule's managers a Slack message at 10:00 the day before a day that still needs people (an email when they muted TurnShift's messages). notifySlack and notifyEmail are how its people hear about their shifts: its Slack channel and Slack messages, an email to each person, both or neither. notifySlack false leaves its Slack channel and turns notifyEmail on, unless notifyEmail false comes with it: both false sends nothing. microsoftChannel is the Microsoft Teams channel it posts to when a shift starts and ends, named Team › Channel, one of the teams TurnShift was added to.

DELETE/api/v1/shifts/:shiftId

Delete a shift

Bookings Read Write

Assign users to shifts on specific dates and retrieve booking schedules.

Specifying users: You can identify users by their numeric ID (e.g., 123) or email (e.g., john@example.com).

GET/api/v1/shifts/:shiftId/bookings?year=2024&month=1

Get bookings for a month

Response:

{
  "shift": { "id": 1, "name": "Support" },
  "year": 2024,
  "month": 1,
  "bookings": {
    "2024-01-15": [
      { "id": 1, "email": "john@example.com", "name": "John Doe" }
    ],
    "2024-01-16": []
  },
  "changedDays": [
    { "date": "2024-01-19", "peopleNeeded": 5, "usualPeopleNeeded": 3,
      "startTime": null, "endTime": null }
  ]
}
POST/api/v1/shifts/:shiftId/bookings/:date

Book a user for a shift on a specific date

Query parameters:

  • notify=true (optional) - Send a Slack notification to the user

Request body:

{
  "user": "john@example.com"  // or user ID: "123"
}
POST/api/v1/shifts/:shiftId/bookings/range

Book a user on selected weekdays in a date range

Query parameters:

  • notify=true (optional) - Send one Slack notification to the user

Request body:

{
  "user": "john@example.com",
  "startDate": "2024-01-15",
  "endDate": "2024-01-26",
  "weekdays": [1, 2, 3, 4, 5]
}

The response includes the assigned dates and skipped dates with their reasons. Ranges can contain up to 93 calendar days.

Example response:

{
  "assigned": ["2024-01-15", "2024-01-16"],
  "skipped": [
    { "date": "2024-01-17", "reason": "already_booked" }
  ]
}

When the person is also on another schedule one of those days, the response adds alsoOnAnotherScheduleThatDay, one entry per day with the other schedule and a url to that day on the calendar. It is a warning, the booking is made.

DELETE/api/v1/shifts/:shiftId/bookings/range

Remove a user's bookings on selected weekdays in a date range, rotation days included

Request body, the same as assigning a range:

{
  "user": "john@example.com",
  "startDate": "2024-01-15",
  "endDate": "2024-01-26",
  "weekdays": [1, 2, 3, 4, 5]
}

Example response:

{ "unassigned": ["2024-01-15", "2024-01-16"] }

"everyone": true in place of user unassigns everyone on those days, and says who left each day:

{
  "unassigned": ["2024-01-15"],
  "removed": [{ "date": "2024-01-15", "slackUserId": 12 }]
}
POST/api/v1/shifts/:shiftId/bookings/auto-assign

Fill the open days between two dates, spread fairly across the people on the shift's teams

Request body, at most 93 days:

{
  "startDate": "2024-01-15",
  "endDate": "2024-01-26"
}

Example response:

{
  "assigned": [
    {
      "date": "2024-01-15",
      "user": { "id": 1, "email": "john@example.com", "name": "John Doe" }
    }
  ]
}
DELETE/api/v1/shifts/:shiftId/bookings/:date

Remove a booking

Query parameters:

  • notify=true (optional) - Send a Slack notification to the user

Request body:

{
  "user": "john@example.com"
}

Rotation Read Write

A rotation (Rotation, as opposed to Manual, in a shift's People tab): the people listed take turns, a day or a week each, on the days the shift runs, until it stops. A change starts at the next round, so turns people already planned around stay put. Name people by ID or email, in the order they take turns.

GET/api/v1/shifts/:shiftId/rotation

Get the shift's rotation: the order, days each person did, the coming turns and recent changes. rotation is null on Manual.

POST/api/v1/shifts/:shiftId/rotation

Start a rotation. Everyone must be on the shift's teams. People get a Slack message with their next turns.

Request body:

{
  "users": ["john@example.com", "jane@example.com"],
  "turnUnit": "week",   // or "day"
  "turnLength": 1,      // 1 to 8
  "peoplePerTurn": 1,   // optional
  "startsOn": "2024-01-15"
}
PUT/api/v1/shifts/:shiftId/rotation

Change who takes turns, their order or the turn length, from the next round. Send dryRun: true to see whose turns move and which turns are left open first.

Request body:

{
  "users": ["jane@example.com", "john@example.com", "ana@example.com"],
  "turnUnit": "week",
  "turnLength": 1,
  "startSooner": false,  // true: people added take the next turn
  "covers": [            // who takes the open turns of people removed
    { "user": "jane@example.com", "dates": ["2024-01-22", "2024-01-23"] }
  ],
  "dryRun": true
}
PATCH/api/v1/shifts/:shiftId/rotation

Stop the rotation with { "stop": true }: the shift goes back to Manual and days from today on are open again. { "stop": false } the same day undoes it.

Coverage Write

Someone needs a teammate to cover their days on a schedule, or a few hours of one day. Everyone on the schedule's teams is asked on Slack (or by email), and the first who accepts takes it. Whole days become theirs, hours stay with the day's person and swap who is on during them. Name coveredBy to pick who covers right away.

GET/api/v1/coverage-requests

List requests for cover, newest first, 200 at most. Filter by status (open, covered, cancelled), scheduleId, user (asked for or covering, an email or id), from and to (YYYY-MM-DD). A status of expired is an open request whose days are past.

Response:

{
  "coverageRequests": [
    {
      "id": 7,
      "scheduleId": 1,
      "scheduleName": "Support",
      "timeZone": "Europe/Paris",
      "dates": ["2026-11-02"],
      "hours": { "start": "15:00", "end": "17:00" },
      "reason": "Dentist",
      "status": "covered",
      "person": { "id": 3, "name": "John Doe", "email": "john@example.com" },
      "coveredBy": { "id": 4, "name": "Jane Roe", "email": "jane@example.com" },
      "requestedBy": { "id": 3, "name": "John Doe", "email": "john@example.com" },
      "declinedBy": [{ "id": 5, "name": "Max Poe", "email": "max@example.com" }],
      "createdAt": "2026-10-27T09:00:00.000Z",
      "coveredAt": "2026-10-27T09:12:00.000Z"
    }
  ]
}
POST/api/v1/coverage-requests

Ask cover for someone's days (1 to 14, each one they are on) or hours of one day, in the schedule's zone. With splits (a covered request's id), the hours are part of hours someone already covers: once taken, those keep the rest around them. Answers 201 with the request.

Request body:

{
  "scheduleId": 1,
  "user": "john@example.com",
  "dates": ["2026-11-02"],
  "hours": { "start": "15:00", "end": "17:00" },
  "reason": "Dentist",
  "coveredBy": "jane@example.com"
}
GET/api/v1/coverage-requests/:id

One request for cover.

POST/api/v1/coverage-requests/:id/accept

Someone covers it. Answers 409 when someone already did or it was cancelled.

Request body:

{ "user": "jane@example.com" }
POST/api/v1/coverage-requests/:id/decline

Someone can't take it: they are not asked again, and the request lists them in declinedBy. Once everyone asked said no, the person (and the manager who asked) is told. They can still accept it later. Answers 409 when someone already covers it or it was cancelled.

Request body:

{ "user": "max@example.com" }
PATCH/api/v1/coverage-requests/:id

Move or resize the hours of a request for a few hours, open or covered. The team's Slack messages show the new hours, and whoever covers or is covered is told.

Request body:

{ "hours": { "start": "12:00", "end": "14:00" } }
PATCH/api/v1/coverage-requests/:id

Someone else covers it, a manager's pick: an open request is covered at once, covered hours change hands, covered whole days move from whoever covered them. Whoever covered is told they no longer do.

Request body:

{ "coveredBy": "natalie@example.com" }
DELETE/api/v1/coverage-requests/:id

Cancel it: an open request, or hours already covered. Whole days already covered are bookings, change them in Bookings.

On shift now Read

GET/api/v1/on-shift?at=2024-01-15T09:00:00Z

Who is on every shift running now, or at the instant you pass as at. Handles time zones and overnight shifts.

Response:

{
  "at": "2024-01-15T09:00:00.000Z",
  "schedules": [
    {
      "schedule": { "id": 1, "name": "Support", "startTime": "09:00",
        "endTime": "18:00", "timeZone": "Europe/Paris" },
      "date": "2024-01-15",
      "people": [{ "email": "john@example.com", "name": "John Doe" }]
    }
  ]
}

Reports Read

GET/api/v1/reports?from=2024-01-01&to=2024-01-31&scheduleId=1

Each person's shifts, days and hours between two dates (366 days at most), for every shift or one with scheduleId. Hours are counted in each shift's time zone: weekends are Saturday and Sunday, nights 10 PM to 6 AM. Rotation turns and swaps count for whoever was on, people who left Slack have leftSlack. Add format=csv for a spreadsheet with the same numbers.

Response:

{
  "from": "2024-01-01",
  "to": "2024-01-31",
  "scheduleId": 1,
  "schedules": [{ "id": 1, "name": "Support", "timeZone": "Europe/Paris" }],
  "people": [
    {
      "id": 2, "name": "John Doe", "email": "john@example.com",
      "leftSlack": false, "shifts": 8, "days": 8, "hours": 72,
      "weekdayHours": 54, "weekendHours": 18, "nightHours": 0,
      "schedules": [{ "id": 1, "shifts": 8, "days": 8, "hours": 72,
        "weekdayHours": 54, "weekendHours": 18, "nightHours": 0 }]
    }
  ],
  "totals": { "shifts": 8, "hours": 72, "weekdayHours": 54,
    "weekendHours": 18, "nightHours": 0 }
}

Teams Read Write

Create, update, and delete teams. Teams group users together for shift assignments.

GET/api/v1/teams

List all teams

POST/api/v1/teams

Create a team

Request body:

{ "name": "Support Team" }
GET/api/v1/teams/:teamId

Get team details

PUT/api/v1/teams/:teamId

Update a team

DELETE/api/v1/teams/:teamId

Delete a team

Team Members Read Write

Add and remove users from teams.

Specifying users: You can identify users by their numeric ID (e.g., 123) or email (e.g., john@example.com).

GET/api/v1/teams/:teamId/members

List team members

POST/api/v1/teams/:teamId/members

Add a member to a team

Request body:

{ "user": "john@example.com" }
DELETE/api/v1/teams/:teamId/members

Remove a member from a team

Request body:

{ "user": "john@example.com" }

Calendar holidays Write

The national public holidays your calendar marks, from up to 5 countries, the same as Settings, Organization. MCP: get_public_holidays and set_public_holidays.

GET/api/v1/holidays?from=2026-12-01&to=2026-12-31&locale=en

The countries picked, the one TurnShift suggests from your schedules' time zones, and their holidays from from to to (the next 90 days without them, a year at most). locale names the holidays: en, fr, de or es.

Response:

{
  "countries": ["FR"],
  "suggestedCountry": "FR",
  "holidays": [
    { "country": "FR", "date": "2026-12-25", "name": "Christmas Day", "days": 1 }
  ]
}
PUT/api/v1/holidays

Pick the countries, two letter ISO codes, [] for none. Answers like GET.

Request body:

{ "countries": ["FR", "US"] }

Invoices Read

GET/api/v1/invoices

Your TurnShift invoices, newest first, the ones listed in Settings, Billing.

Response:

{
  "invoices": [
    {
      "number": "TS-0042",
      "date": "2024-01-01",
      "total": "35.00",
      "currency": "EUR",
      "status": "paid",
      "url": "https://invoice.stripe.com/...",
      "pdf": "https://pay.stripe.com/invoice/.../pdf"
    }
  ]
}

Changelog Read

TurnShift's release notes, newest first, the same as the changelog. No token needed. The MCP server has it too, as list_changelog, and so does the RSS feed.

GET/api/v1/changelog

List release notes. Optional query parameters: since (YYYY-MM-DD, notes published that day or later) and limit (1 to 50, 10 by default).

Response:

{
  "entries": [
    {
      "title": "Roles are here",
      "date": "2026-08-29T22:52:35Z",
      "url": "https://turnshift.app/blog/roles-are-here",
      "summary": "Until now anyone in your organization could edit anything...",
      "markdown": "Until now anyone in your organization could edit anything..."
    }
  ]
}

Public holidays Read

The public holidays of Germany and its 16 states, the United Kingdom, the United States, France, Spain, Argentina, Mexico, Colombia, Chile and Peru, the same lists as the holiday pages. No token needed, and any site can call it from the browser. The MCP server has it too, as free_holidays. Each list is also a static file at /tools/holidays/germany/2027.json and a calendar feed at /tools/holidays/germany/calendar.ics, listed in /tools/holidays/index.json.

GET/api/v1/free/holidays

List a place's public holidays. Query parameters: country (ISO code: DE, GB, US, FR, ES, AR, MX, CO, CL or PE), optional region (a German state's ISO 3166-2 code, like DE-BY) and optional year (2027 or 2028, 2027 by default).

Response:

{
  "place": { "slug": "bavaria", "name": "Bavaria", "code": "DE-BY", "country": "DE" },
  "year": 2027,
  "holidays": [
    {
      "date": "2027-01-01",
      "weekday": "Friday",
      "name": { "en": "New Year's Day", "fr": "Jour de l'an", "de": "Neujahrstag", "es": "Año Nuevo" },
      "localName": "Neujahrstag"
    }
  ],
  "longWeekends": [{ "first": "2027-01-01", "last": "2027-01-03", "days": 3 }],
  "bridgeDays": [{ "take": "2027-05-07", "first": "2027-05-06", "last": "2027-05-09", "days": 4 }],
  "page": "https://turnshift.app/tools/holidays/bavaria/2027",
  "calendar": "https://turnshift.app/tools/holidays/bavaria/calendar.ics",
  "checked": "2026-11-29"
}

Time zones Read

Every time zone of the IANA tz database with what its clock shows now, and a time converted from one clock to another, the same answers as the time zone converter and the time zone map. No token needed, and any site can call them from the browser. The MCP server has them too, as free_time_zones and free_convert_time. The whole list is also a static file at /tools/time-zones/index.json, rebuilt every hour.

GET/api/v1/free/time-zones

List time zones. Optional query parameters: country (ISO code, like US or IN), zone (an IANA name, old ones like Asia/Calcutta too) and q (words to find in names, cities, countries and abbreviations). Without any, the whole list.

Response:

{
  "tzdbVersion": "2026e",
  "at": "2026-11-29T09:00:00.000Z",
  "count": 1,
  "timeZones": [
    {
      "name": "America/New_York",
      "alternativeName": "Eastern Time",
      "group": ["America/New_York", "America/Detroit", "US/Eastern"],
      "countryCode": "US",
      "countryName": "United States",
      "continentCode": "NA",
      "continentName": "North America",
      "mainCities": ["New York City", "Brooklyn", "Queens", "Philadelphia"],
      "abbreviation": "EST",
      "dstAbbreviation": "EDT",
      "rawOffsetInMinutes": -300,
      "currentOffsetInMinutes": -300,
      "currentOffset": "UTC−5",
      "currentAbbreviation": "EST",
      "daylightSaving": false,
      "nextChange": { "at": "2027-03-14T07:00:00.000Z", "offsetInMinutes": -240, "offset": "UTC−4" }
    }
  ],
  "page": "https://turnshift.app/tools/time-zone-map",
  "convert": "https://turnshift.app/api/v1/free/convert-time"
}
GET/api/v1/free/convert-time

Convert a time. Query parameters: from and to (an abbreviation like EST, PST, UTC, GMT, CET or IST, or an IANA name like Europe/Paris), optional time on the from side (09:00 for today, 2027-07-10T09:00, or 2027-07-10 for noon; now when left out) and optional strict=true. An abbreviation is read as the clock its place shows on that date: EST in July is New York's time, EDT. With strict=true it keeps its own offset, UTC−5.

Response for ?from=EST&to=IST&time=2027-07-10T09:00:

{
  "from": {
    "code": "EST",
    "name": "Eastern Standard Time",
    "timeZone": "America/New_York",
    "time": "2027-07-10T09:00",
    "offsetInMinutes": -240,
    "offset": "UTC−4",
    "abbreviation": "EDT"
  },
  "to": {
    "code": "IST",
    "name": "India Standard Time",
    "timeZone": "Asia/Kolkata",
    "time": "2027-07-10T18:30",
    "offsetInMinutes": 330,
    "offset": "UTC+5:30",
    "abbreviation": "IST"
  },
  "utc": "2027-07-10T13:00:00.000Z",
  "differenceInMinutes": 570,
  "dayShift": 0,
  "strict": false,
  "notes": ["America/New_York is on EDT (UTC−4) at that time, not EST: ..."],
  "page": "https://turnshift.app/tools/time-zone-converter/est-to-ist",
  "tzdbVersion": "2026e"
}

Error Responses

Errors return a JSON object with error and optional details:

{
  "error": "Unauthorized",
  "details": "Invalid API token"
}
StatusMeaning
400Bad request / Validation error
401Unauthorized (invalid or missing token)
403Forbidden (organization blocked)
404Resource not found
405Method not allowed

TurnShift API v1