> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novacal.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Availability

> Create a Novacal availability schedule with its own timezone and open hours, then point event types at it.

## What you send

Only `name` is required.

```json theme={null}
{
  "name": "Working hours",
  "timezone": "Europe/Belgrade",
  "hours": {
    "monday": [{ "start": "09:00", "end": "17:00" }],
    "tuesday": [
      { "start": "09:00", "end": "12:00" },
      { "start": "14:00", "end": "17:00" }
    ]
  }
}
```

* Times use the 24-hour `HH:MM` format, in the timezone of the schedule.
* A weekday you leave out is closed. The example above is open on two days only.
* Two periods in one day make a break between them. They must not overlap, and `end` must be after `start`.
* Without `timezone`, the schedule takes your account timezone.
* Without `hours`, the schedule opens Monday to Friday, 09:00 to 17:00.

## What happens next

The response contains the new schedule with its ID. Use that ID with [Update Event Type](/api-reference/v1/event-types/update) to make an event type follow it.

A new schedule is not your default one, so it changes nothing until an event type points at it. The one exception is the first schedule on an account, which becomes the default.


## OpenAPI

````yaml POST /v1/availabilities
openapi: 3.1.0
info:
  title: Events API
  description: Public API for managing event types
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.novacal.io
security:
  - bearerAuth: []
paths:
  /v1/availabilities:
    post:
      description: >-
        Creates an availability schedule. The working days are derived from the
        weekdays you send hours for. A new schedule is not the default one,
        unless it is the first schedule on the account.
      requestBody:
        description: Availability schedule to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewAvailability'
        required: true
      responses:
        '201':
          description: Availability created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailabilityResponse'
components:
  schemas:
    NewAvailability:
      required:
        - name
      type: object
      properties:
        name:
          description: The name of the schedule
          type: string
          maxLength: 255
          example: Working hours
        timezone:
          description: >-
            IANA timezone the hours are expressed in. Defaults to your account
            timezone.
          type: string
          example: Europe/Belgrade
        hours:
          description: >-
            Open hours per weekday, in the schedule timezone. A weekday you
            leave out is closed. Defaults to monday to friday, 09:00 to 17:00.
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/AvailabilityHours'
          example:
            monday:
              - start: '09:00'
                end: '17:00'
            tuesday:
              - start: '09:00'
                end: '12:00'
              - start: '14:00'
                end: '17:00'
    AvailabilityResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          description: Indicates whether the request was successful
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Availability'
    AvailabilityHours:
      type: object
      properties:
        start:
          description: Opening time in HH:MM, in the schedule timezone
          type: string
          example: '09:00'
        end:
          description: Closing time in HH:MM, in the schedule timezone
          type: string
          example: '17:00'
    Availability:
      type: object
      properties:
        id:
          description: The unique identifier of the availability schedule
          type: integer
          example: 7
        name:
          description: The name of the schedule
          type: string
          example: Working hours
        timezone:
          description: IANA timezone the hours are expressed in
          type: string
          example: Europe/Belgrade
        is_default:
          description: Whether new event types get this schedule
          type: boolean
          example: true
        working_days:
          description: The weekdays the schedule is open on
          type: array
          items:
            type: string
            enum:
              - monday
              - tuesday
              - wednesday
              - thursday
              - friday
              - saturday
              - sunday
          example:
            - monday
            - tuesday
        hours:
          description: >-
            Open hours per weekday, in the schedule timezone. A weekday that is
            absent is closed.
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/AvailabilityHours'
          example:
            monday:
              - start: '09:00'
                end: '17:00'
            tuesday:
              - start: '09:00'
                end: '12:00'
              - start: '14:00'
                end: '17:00'
        created_at:
          description: The date and time the schedule was created
          type: string
          format: date-time
        updated_at:
          description: The date and time the schedule was last changed
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````