---
updatedAt: 2025-06-05T01:08:59.000Z
agentTools:
  projectIndex: https://developers.7shifts.com/v2.2023.0501/llms.txt
---

# Create Availability

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "7shifts API",
    "contact": {
      "email": "api-support@7shifts.com"
    },
    "version": "2023-05-01"
  },
  "servers": [
    {
      "url": "https://api.7shifts.com",
      "description": "Production server"
    }
  ],
  "paths": {
    "/v2/company/{company_id}/availabilities": {
      "post": {
        "tags": [
          "Availability"
        ],
        "summary": "Create Availability",
        "operationId": "CreateAvailability",
        "parameters": [
          {
            "name": "company_id",
            "in": "path",
            "description": "Company ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1234
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer",
                    "description": "User ID"
                  },
                  "week": {
                    "type": "string",
                    "nullable": true,
                    "description": "Week date of the availability"
                  },
                  "week_to": {
                    "type": "string",
                    "nullable": true,
                    "description": "Week to date of the availability"
                  },
                  "repeat": {
                    "type": "boolean",
                    "description": "If true, availability is repeating"
                  },
                  "mon": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "mon_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "mon_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "mon_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "mon_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  },
                  "tue": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "tue_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "tue_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "tue_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "tue_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  },
                  "wed": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "wed_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "wed_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "wed_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "wed_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  },
                  "thu": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "thu_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "thu_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "thu_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "thu_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  },
                  "fri": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "fri_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "fri_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "fri_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "fri_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  },
                  "sat": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "sat_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "sat_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "sat_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "sat_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  },
                  "sun": {
                    "type": "integer",
                    "description": "The availability status for the day"
                  },
                  "sun_from": {
                    "type": "string",
                    "format": "time",
                    "description": "The start time of the availability for the day"
                  },
                  "sun_to": {
                    "type": "string",
                    "format": "time",
                    "description": "The end time of the availability for the day"
                  },
                  "sun_comments": {
                    "type": "string",
                    "nullable": true,
                    "description": "Comments included in the days availability"
                  },
                  "sun_reason": {
                    "type": "string",
                    "description": "The reason ID for the day"
                  }
                },
                "required": [
                  "user_id",
                  "repeat",
                  "mon",
                  "mon_from",
                  "mon_to",
                  "mon_comments",
                  "mon_reason",
                  "tue",
                  "tue_from",
                  "tue_to",
                  "tue_comments",
                  "tue_reason",
                  "wed",
                  "wed_from",
                  "wed_to",
                  "wed_comments",
                  "wed_reason",
                  "thu",
                  "thu_from",
                  "thu_to",
                  "thu_comments",
                  "thu_reason",
                  "fri",
                  "fri_from",
                  "fri_to",
                  "fri_comments",
                  "fri_reason",
                  "sat",
                  "sat_from",
                  "sat_to",
                  "sat_comments",
                  "sat_reason",
                  "sun",
                  "sun_from",
                  "sun_to",
                  "sun_comments",
                  "sun_reason"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Availability created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "availability"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Availability ID"
                        },
                        "status": {
                          "type": "integer",
                          "description": "Indicates the status of the availability"
                        }
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://app.7shifts.com/oauth2/token",
            "refreshUrl": "https://app.7shifts.com/oauth2/token",
            "scopes": {
              "v1_access": "Required to access APIv1 endpoints."
            }
          },
          "password": {
            "tokenUrl": "https://app.7shifts.com/oauth2/token",
            "refreshUrl": "https://app.7shifts.com/oauth2/token",
            "scopes": {
              "v1_access": "Required to access APIv1 endpoints."
            }
          },
          "authorizationCode": {
            "authorizationUrl": "https://app.7shifts.com/oauth2/authorize",
            "tokenUrl": "https://app.7shifts.com/oauth2/token",
            "refreshUrl": "https://app.7shifts.com/oauth2/token",
            "scopes": {
              "v1_access": "Required to access APIv1 endpoints."
            }
          }
        }
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "7session"
      }
    }
  },
  "security": [
    {
      "OAuth2": []
    },
    {
      "cookieAuth": []
    }
  ],
  "tags": [
    {
      "name": "Availability"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```