> ## 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.

# Update Availability

> Change the name, timezone, or open hours of a Novacal availability schedule.

## Partial updates

Send only the fields you change. A field you leave out keeps its value.

```json theme={null}
{ "name": "Mornings only" }
```

## The hours replace the whole week

`hours` is one value, not a list you add to. The week you send becomes the week that is stored, and every weekday you leave out becomes closed.

```json theme={null}
{
  "hours": {
    "monday": [{ "start": "09:00", "end": "12:00" }]
  }
}
```

That schedule is now open on Monday morning and **closed on every other day**. To keep Tuesday open, send Tuesday as well.

`working_days` follows the days that have hours, so you never send it.

## Two effects to know

* **A new timezone moves the real times.** The hours stay as written, so `09:00` becomes `09:00` in the new timezone. A person in the old timezone sees a different hour.
* **Booked events do not move.** A schedule only decides which times are free from now on.

## Access

You can only change schedules on your own account. Another account's schedule returns `403 access_denied`.


## OpenAPI

````yaml PUT /v1/availabilities/{id}
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/{id}:
    put:
      description: >-
        Updates an availability schedule. The working days are derived from the
        weekdays you send hours for.
      parameters:
        - name: id
          in: path
          description: ID of the availability schedule to update
          required: true
          schema:
            type: integer
      requestBody:
        description: Availability fields to update. Partial updates are supported.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAvailability'
        required: true
      responses:
        '200':
          description: Availability updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailabilityResponse'
components:
  schemas:
    UpdateAvailability:
      description: >-
        Fields to update. Send only the fields you want to change. Fields you
        omit keep their current value.
      type: object
      properties:
        name:
          description: The name of the schedule
          type: string
          maxLength: 255
          example: Mornings only
        timezone:
          description: IANA timezone the hours are expressed in
          type: string
          example: Europe/Belgrade
        hours:
          description: >-
            Open hours per weekday, in the schedule timezone. This replaces the
            whole week, so a weekday you leave out becomes closed.
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/AvailabilityHours'
          example:
            monday:
              - start: '09:00'
                end: '12: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

````