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

# Replace business hours

> One schedule for the organization. timezone is an IANA name such as America/Sao_Paulo. weekly_hours is an object whose keys are mon, tue, wed, thu, fri, sat, and sun. Each value is null when that day is closed, or one range {"opens_at": "09:00", "closes_at": "18:00"}. Times are 24-hour HH:MM with no seconds (not HH:MM:SS). The opening minute is inside the range. A close earlier than the open continues overnight. Omitted weekdays are stored as closed. A list of ranges is rejected. Date exceptions are a separate list. No saved schedule means open 24/7 and weekly_hours is {}. is_open_now, next_open (ISO UTC), and next_open_display (organization working language) are read-only. PUT null or an empty object removes the schedule, same as DELETE.



## OpenAPI

````yaml https://api.initdesk.com/schema.yaml put /organizations/{organization_id}/business-hours/
openapi: 3.0.3
info:
  title: initdesk Customer API
  version: 2.1.0
  description: OpenAPI documentation for the customer-facing API served by the gateway.
servers:
  - url: https://api.initdesk.com
    description: Customer API gateway
security:
  - IntegrationToken: []
tags:
  - name: Organizations
    description: Organization metadata and context for all other resources.
  - name: Business Hours
    description: >-
      When the organization is open: time zone, one range per weekday, and date
      exceptions. No saved schedule means open 24/7.
  - name: Customers
    description: >-
      End users (requesters) scoped to the organization. Tickets reference
      customers by ID.
  - name: Tickets
    description: >-
      Tickets, messages, attachments, search, and statuses. A ticket is the
      conversation container; messages are nested under
      `/tickets/{pk}/messages/`.


      **Attachments (two-phase upload):** upload the file first (multipart field
      `file_upload`), then pass the returned `id` values as `attachment_ids`
      when creating a ticket or message.

      - New ticket: `POST
      /organizations/{organization_id}/pending-attachments/`, then `POST
      /organizations/{organization_id}/tickets/` with `attachment_ids`.

      - Reply on an existing ticket: `POST
      /organizations/{organization_id}/tickets/{ticket_id}/attachments/`, then
      `POST .../messages/` with `attachment_ids`.

      Max size is 50 MB. Large or slow uploads may hit the public gateway
      timeout (30s). Unused temporary uploads are deleted automatically (default
      ~24 hours); there is no public delete endpoint. Content types `text/html*`
      and `image/svg+xml` are rejected.
  - name: Custom Preset Filters
    description: >-
      Saved ticket search filters scoped to the organization. Integration tokens
      receive organization-shared filters only.
  - name: Inboxes
    description: >-
      Organization mailboxes for routing tickets. Each inbox has an email prefix
      and optional default-inbox flag (is_default: true). On ticket create,
      inbox_id is optional: omit to use the default inbox, or provide an inbox
      ID to target a specific mailbox.
  - name: Tags
    description: Organization-scoped ticket tags with id, name, and optional color.
  - name: Help Center
    description: >-
      Support portal settings, knowledge base collections, articles, and article
      search.
  - name: Companies
    description: >-
      Organization-scoped groupings of customers. A customer belongs to at most
      one company (nested `customer.company`); companies carry a default
      assignee and optional email domains used for member suggestions.
paths:
  /organizations/{organization_id}/business-hours/:
    put:
      tags:
        - Business Hours
      summary: Replace business hours
      description: >-
        One schedule for the organization. timezone is an IANA name such as
        America/Sao_Paulo. weekly_hours is an object whose keys are mon, tue,
        wed, thu, fri, sat, and sun. Each value is null when that day is closed,
        or one range {"opens_at": "09:00", "closes_at": "18:00"}. Times are
        24-hour HH:MM with no seconds (not HH:MM:SS). The opening minute is
        inside the range. A close earlier than the open continues overnight.
        Omitted weekdays are stored as closed. A list of ranges is rejected.
        Date exceptions are a separate list. No saved schedule means open 24/7
        and weekly_hours is {}. is_open_now, next_open (ISO UTC), and
        next_open_display (organization working language) are read-only. PUT
        null or an empty object removes the schedule, same as DELETE.
      operationId: update_business_hours
      parameters:
        - in: path
          name: organization_id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessHoursRequest'
            examples:
              ReplaceWeekdaySchedule:
                value:
                  timezone: America/Sao_Paulo
                  weekly_hours:
                    mon:
                      opens_at: '09:00'
                      closes_at: '18:00'
                    tue:
                      opens_at: '09:00'
                      closes_at: '18:00'
                    wed:
                      opens_at: '09:00'
                      closes_at: '18:00'
                    thu:
                      opens_at: '09:00'
                      closes_at: '18:00'
                    fri:
                      opens_at: '09:00'
                      closes_at: '18:00'
                    sat: null
                    sun: null
                summary: Replace weekday schedule
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BusinessHoursRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BusinessHoursRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessHours'
              examples:
                WeekdaySchedule:
                  value:
                    timezone: America/Sao_Paulo
                    weekly_hours:
                      mon:
                        opens_at: '09:00'
                        closes_at: '18:00'
                      tue:
                        opens_at: '09:00'
                        closes_at: '18:00'
                      wed:
                        opens_at: '09:00'
                        closes_at: '18:00'
                      thu:
                        opens_at: '09:00'
                        closes_at: '18:00'
                      fri:
                        opens_at: '09:00'
                        closes_at: '18:00'
                      sat: null
                      sun: null
                    is_open_now: false
                    next_open: '2026-10-12T12:00:00Z'
                    next_open_display: Monday, October 12, 9:00 AM (BRT)
                  summary: Weekday schedule
          description: ''
        '204':
          description: No response body
      security:
        - IntegrationToken: []
components:
  schemas:
    BusinessHoursRequest:
      type: object
      description: |-
        Organization schedule. Send timezone and weekly_hours to save.

        is_open_now, next_open, and next_open_display are read-only. No saved
        schedule returns timezone null and weekly_hours {}.
      properties:
        timezone:
          type: string
          nullable: true
          minLength: 1
          description: >-
            IANA time zone, for example America/Sao_Paulo. Required when saving.
            Null only when no schedule is saved.
        weekly_hours:
          allOf:
            - $ref: '#/components/schemas/WeeklyHoursRequest'
          description: >-
            Keys mon, tue, wed, thu, fri, sat, sun. null means closed. One range
            is {"opens_at": "09:00", "closes_at": "18:00"} (24-hour HH:MM, no
            seconds). Omit a key to store that day as closed.
      required:
        - timezone
        - weekly_hours
    BusinessHours:
      type: object
      description: |-
        Organization schedule. Send timezone and weekly_hours to save.

        is_open_now, next_open, and next_open_display are read-only. No saved
        schedule returns timezone null and weekly_hours {}.
      properties:
        timezone:
          type: string
          nullable: true
          description: >-
            IANA time zone, for example America/Sao_Paulo. Required when saving.
            Null only when no schedule is saved.
        weekly_hours:
          allOf:
            - $ref: '#/components/schemas/WeeklyHours'
          description: >-
            Keys mon, tue, wed, thu, fri, sat, sun. null means closed. One range
            is {"opens_at": "09:00", "closes_at": "18:00"} (24-hour HH:MM, no
            seconds). Omit a key to store that day as closed.
        is_open_now:
          type: boolean
          readOnly: true
          description: True when the organization is open at the current time.
        next_open:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: >-
            Start of the next opening after the current stretch, as ISO-8601
            UTC. Null when there is no next opening.
        next_open_display:
          type: string
          readOnly: true
          description: >-
            next_open in the organization working language. Empty when there is
            no next opening.
      required:
        - is_open_now
        - next_open
        - next_open_display
        - timezone
        - weekly_hours
    WeeklyHoursRequest:
      type: object
      description: >-
        Weekday keys mon, tue, wed, thu, fri, sat, and sun.


        null or an omitted key means closed. Each open day is one object,

        {"opens_at": "09:00", "closes_at": "18:00"}. A list of ranges is
        rejected.
      properties:
        mon:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Monday. null means closed.
        tue:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Tuesday. null means closed.
        wed:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Wednesday. null means closed.
        thu:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Thursday. null means closed.
        fri:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Friday. null means closed.
        sat:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Saturday. null means closed.
        sun:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRangeRequest'
          nullable: true
          description: Sunday. null means closed.
      additionalProperties: false
      example:
        mon:
          opens_at: '09:00'
          closes_at: '18:00'
        tue:
          opens_at: '09:00'
          closes_at: '18:00'
        wed:
          opens_at: '09:00'
          closes_at: '18:00'
        thu:
          opens_at: '09:00'
          closes_at: '18:00'
        fri:
          opens_at: '09:00'
          closes_at: '18:00'
        sat: null
        sun: null
    WeeklyHours:
      type: object
      description: >-
        Weekday keys mon, tue, wed, thu, fri, sat, and sun.


        null or an omitted key means closed. Each open day is one object,

        {"opens_at": "09:00", "closes_at": "18:00"}. A list of ranges is
        rejected.
      properties:
        mon:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Monday. null means closed.
        tue:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Tuesday. null means closed.
        wed:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Wednesday. null means closed.
        thu:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Thursday. null means closed.
        fri:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Friday. null means closed.
        sat:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Saturday. null means closed.
        sun:
          allOf:
            - $ref: '#/components/schemas/BusinessHoursRange'
          nullable: true
          description: Sunday. null means closed.
      additionalProperties: false
      example:
        mon:
          opens_at: '09:00'
          closes_at: '18:00'
        tue:
          opens_at: '09:00'
          closes_at: '18:00'
        wed:
          opens_at: '09:00'
          closes_at: '18:00'
        thu:
          opens_at: '09:00'
          closes_at: '18:00'
        fri:
          opens_at: '09:00'
          closes_at: '18:00'
        sat: null
        sun: null
    BusinessHoursRangeRequest:
      type: object
      description: >-
        One weekday range. Times are 24-hour HH:MM with no seconds.


        The opening minute is inside the range and the closing minute is
        outside.

        A close earlier than the open continues overnight. Date exceptions are a

        separate resource and accept HH:MM or HH:MM:SS.
      properties:
        opens_at:
          type: string
          minLength: 1
          description: 24-hour HH:MM, for example 09:00. Do not include seconds.
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        closes_at:
          type: string
          minLength: 1
          description: >-
            24-hour HH:MM. The closing minute is outside the range. Earlier than
            opens_at continues overnight.
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
      required:
        - closes_at
        - opens_at
      additionalProperties: false
      example:
        opens_at: '09:00'
        closes_at: '18:00'
    BusinessHoursRange:
      type: object
      description: >-
        One weekday range. Times are 24-hour HH:MM with no seconds.


        The opening minute is inside the range and the closing minute is
        outside.

        A close earlier than the open continues overnight. Date exceptions are a

        separate resource and accept HH:MM or HH:MM:SS.
      properties:
        opens_at:
          type: string
          description: 24-hour HH:MM, for example 09:00. Do not include seconds.
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        closes_at:
          type: string
          description: >-
            24-hour HH:MM. The closing minute is outside the range. Earlier than
            opens_at continues overnight.
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
      required:
        - closes_at
        - opens_at
      additionalProperties: false
      example:
        opens_at: '09:00'
        closes_at: '18:00'
  securitySchemes:
    IntegrationToken:
      type: apiKey
      in: header
      name: X-Initdesk-Token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.