---
title: "Create schedule unavailability"
method: POST
path: "/scheduler/v1/schedulers/{schedulerId}/unavailability"
tags: ["Schedule:v1:Schedulers:Schedule:Schedule Unavailability"]
---

# Create schedule unavailability

`POST /scheduler/v1/schedulers/{schedulerId}/unavailability`

## Request

- Base URL: `https://api.connecteam.com`
- URL: `https://api.connecteam.com/scheduler/v1/schedulers/{schedulerId}/unavailability`
- Auth: one of:
  - API key in header `X-API-KEY`
  - OAuth 2
    - Client credentials
    - Token URL: `/oauth/v1/token` scopes: `schedule.write`

Create a single unavailability in the specified schedule for a designated user on a given date. The unavailability can be set for the entire day or for a specific part of it. Repeating unavailabilities are currently not supported. The timezone of the unavailability will be determined based on the schedule's settings.

## Path parameters

- `schedulerId` integer, required: The unique identifier of the schedule

## Request body

- UnavailabilityCreateRequest
  - `userId` integer, required: The unique identifier of the user to which the unavailability will be assigned
  - `isAllDay` boolean, required: Specifies the type of the time period for the unavailability, Defaults to true. If set to false, start and end time fields must be specified.
  - `unavailabilityDate` string, required: The date of the unavailability in ISO format (YYYY-MM-DD).
  - `timezone` string, nullable: The timezone of the unavailability in Tz format (e.g. America/New_York). If not specified, it uses the timezone configured in the app settings.
  - `note` string, nullable: Optional note with additional details about the unavailability
  - `startTime` string, nullable: The start time of the unavailability in ISO format (HH:MM:SS). This field is required if isAllDay set to false.
  - `endTime` string, nullable: The end time of the unavailability in ISO format (HH:MM:SS). This field is required if isAllDay set to false.

## Response `200`

Successful Response

- APIResponseV2UnavailabilityCreateResponse
  - `requestId` string
  - `data` UnavailabilityCreateResponse, required
    - `id` string, required: The ID of the unavailability
    - `userId` integer, required: The ID of the user to which the unavailability is assigned
    - `isAllDay` boolean, required: Whether the unavailability is for the entire day
    - `unavailabilityDate` string, required: The date of the unavailability in ISO format (YYYY-MM-DD)
    - `startTime` string, nullable: The start time of the unavailability in ISO format (HH:MM:SS)
    - `endTime` string, nullable: The end time of the unavailability in ISO format (HH:MM:SS)
    - `timezone` string, required: The timezone of the unavailability in Tz format (e.g. America/New_York)
    - `note` string, nullable: Optional note with additional details about the unavailability

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/connecteam/apis/connecteam-api-documentation.md) - [All operations](https://skmtc.dev/connecteam/apis/connecteam-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/connecteam/apis/connecteam-api-documentation/revisions/a01dde7c27fb?raw)
