---
title: "Create rotation schedule"
method: POST
path: "/rotationschedules"
tags: ["Rotation Schedules"]
---

# Create rotation schedule

`POST /rotationschedules`

## Request

- Base URL: `https://api.getmaintainx.com/v1`
- URL: `https://api.getmaintainx.com/v1/rotationschedules`
- Auth: HTTP bearer

Creates a custom work rotation. Assigning users removes them from any rotation they are currently assigned to. A rotation can only be created as the default in an organization with no saved default.

## Query parameters

- `skipWebhook` boolean

## Headers

- `x-organization-id` integer

## Request body

- object
  - `name` string, required
  - `startDate` string, date-time, required: First day of the rotation (ISO 8601 UTC datetime, RFC 3339 date-time format). The pattern in `days` repeats from this date. The value is converted to UTC before storage, send in UTC `T00:00:00.000Z` to pin an exact day.
  - `days` object[], required: The repeating pattern, one entry per day of the cycle, ordered by `dayIndex`.
    - `dayIndex` integer, required: Position of the day in the rotation, starting at 0 on `startDate`
    - `dayType` 'WORKING' | 'NON_WORKING', required
    - `seconds` integer, required: Seconds worked on that day. Always 0 for a `NON_WORKING` day.
  - `userIds` integer[], required: Users to assign to this rotation. Each user is removed from whatever rotation they are currently on.
  - `isDefault` boolean: Whether this is the organization's default rotation, applied to every user without a rotation of their own. This can only be true when the organization has no saved default and is using its virtual default.

## Response `201`

Successfully created rotation schedule

- object
  - `id` integer, required: Global ID of the rotation schedule. `0` is an alias addressing the organization's current default rotation: its saved default when it has one, otherwise the virtual default it gets until it saves one of its own. Responses always carry the canonical id, so a request against `0` can come back with a different `id`.

## Other responses

- `400`: OrganizationId was not provided
- `401`: Invalid token
- `403`: The caller cannot create rotation schedules
- `404`: Could not find the specified route.
- `500`: Internal server error.

## Changes

> 30 revisions in range; 1 not diffed.

- **2026-10-16** `08b21e946629`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getmaintainx/apis/maintainx-api/changes/rotationschedules/post.md)

---

[API](https://skmtc.dev/getmaintainx/apis/maintainx-api.md) - [All operations](https://skmtc.dev/getmaintainx/apis/maintainx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getmaintainx/apis/maintainx-api/revisions/6258367c04ff?raw)
