---
title: "Set user work shifts"
method: POST
path: "/work-shifts"
tags: ["Users"]
---

# Set user work shifts

`POST /work-shifts`

Set per-day work shift capacity for one or more users. Re-sending a (user, date) pair overwrites the previous override. A maximum of 250 work shifts can be set per request.

## Query parameters

- `skipWebhook` boolean

## Headers

- `x-organization-id` integer

## Request body

- object
  - `workShifts` object[], required
    - `userId` number, required — Global ID of the user whose daily capacity is being set.
    - `date` string, required — The specific day being overridden (ISO 8601 UTC datetime). Clients must convert from the organization's timezone to UTC before sending. For example, 2024-06-17 in America/Chicago (UTC-5) becomes 2024-06-17T05:00:00Z.
    - `seconds` number, required — Capacity in seconds for that day. Must be between 0 and 86400.
    - `status` 'NON_WORKING' | 'TIME_OFF' | 'WORKING', nullable — Work shift status. If omitted or null, it is derived from seconds: WORKING when seconds > 0, otherwise NON_WORKING. Note that omitting status on a day that already has an override will overwrite the existing status with the new derived value. TIME_OFF requires the Custom Work Rotations feature. TIME_OFF and NON_WORKING must have seconds set to 0.

## Response `201`

Successfully set the work shifts.

## Other responses

- `400` — The request body was invalid. Possible causes: seconds outside 0–86400; NON_WORKING or TIME_OFF with non-zero seconds; WORKING with zero seconds; or more than 250 work shifts in one request.
- `401` — Invalid token
- `403` — You do not have permission to edit workload capacity.
- `404` — Could not find the specified user.
- `500` — Internal server error.

---

[API](https://skmtc.net/getmaintainx/apis/maintainx-api.md) · [All operations](https://skmtc.net/getmaintainx/apis/maintainx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getmaintainx/maintainx-api/revisions/ef9153fcac7c/schema)
