---
title: "Create Availability"
method: POST
path: "/v2/company/{company_id}/availabilities"
tags: ["Availability"]
---

# Create Availability

`POST /v2/company/{company_id}/availabilities`

## Request

- Base URL: `https://api.7shifts.com`
- URL: `https://api.7shifts.com/v2/company/{company_id}/availabilities`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.7shifts.com/oauth2/authorize`
    - Client credentials
    - Password
    - Token URL: `https://app.7shifts.com/oauth2/token`
  - API key in cookie `7session`
- TypeScript: <https://skmtc.dev/7shifts/apis/7shifts-api/docs/v2/company/:company_id/availabilities/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `company_id` integer, required

## Headers

- `x-api-version` string: An API version
- `x-company-guid` string, uuid

## Request body

- object
  - `user_id` integer, required: User ID
  - `week` string, nullable: Week date of the availability
  - `week_to` string, nullable: Week to date of the availability
  - `repeat` boolean, required: If true, availability is repeating
  - `mon` integer, required: The availability status for the day
  - `mon_from` string, time, required: The start time of the availability for the day
  - `mon_to` string, time, required: The end time of the availability for the day
  - `mon_comments` string, nullable, required: Comments included in the days availability
  - `mon_reason` string, nullable, required: The reason ID for the day
  - `tue` integer, required: The availability status for the day
  - `tue_from` string, time, required: The start time of the availability for the day
  - `tue_to` string, time, required: The end time of the availability for the day
  - `tue_comments` string, nullable, required: Comments included in the days availability
  - `tue_reason` string, nullable, required: The reason ID for the day
  - `wed` integer, required: The availability status for the day
  - `wed_from` string, time, required: The start time of the availability for the day
  - `wed_to` string, time, required: The end time of the availability for the day
  - `wed_comments` string, nullable, required: Comments included in the days availability
  - `wed_reason` string, nullable, required: The reason ID for the day
  - `thu` integer, required: The availability status for the day
  - `thu_from` string, time, required: The start time of the availability for the day
  - `thu_to` string, time, required: The end time of the availability for the day
  - `thu_comments` string, nullable, required: Comments included in the days availability
  - `thu_reason` string, nullable, required: The reason ID for the day
  - `fri` integer, required: The availability status for the day
  - `fri_from` string, time, required: The start time of the availability for the day
  - `fri_to` string, time, required: The end time of the availability for the day
  - `fri_comments` string, nullable, required: Comments included in the days availability
  - `fri_reason` string, nullable, required: The reason ID for the day
  - `sat` integer, required: The availability status for the day
  - `sat_from` string, time, required: The start time of the availability for the day
  - `sat_to` string, time, required: The end time of the availability for the day
  - `sat_comments` string, nullable, required: Comments included in the days availability
  - `sat_reason` string, nullable, required: The reason ID for the day
  - `sun` integer, required: The availability status for the day
  - `sun_from` string, time, required: The start time of the availability for the day
  - `sun_to` string, time, required: The end time of the availability for the day
  - `sun_comments` string, nullable, required: Comments included in the days availability
  - `sun_reason` string, nullable, required: The reason ID for the day

## Response `201`

Availability created

- object
  - `object` 'availability', required
  - `data` object, required
    - `id` integer: Availability ID
    - `status` integer: Indicates the status of the availability

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/7shifts/apis/7shifts-api.md) - [All operations](https://skmtc.dev/7shifts/apis/7shifts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/7shifts/apis/7shifts-api/revisions/40e0ef40dfcd?raw)
