---
title: "Replace opening hours"
method: PUT
path: "/api/v1/businesses/hours"
tags: ["businesses"]
---

# Replace opening hours

`PUT /api/v1/businesses/hours`

## Request

- Base URL: `https://api.izap.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.izap.ai/api/v1/businesses/hours`
- Auth: HTTP bearer

Replaces the whole week's opening hours in one call — a weekday omitted from the request is treated as closed. Changes take effect on live conversations immediately. The business is taken from the `business-id` header rather than the URL; the path-scoped form of this operation is deprecated.

## Headers

- `business-id` string, nullable, required: UUID of the business the request is scoped to. Required on this route; the deprecated /businesses/{business_id}/... form takes it from the path instead.

## Request body

- BusinessHoursIn
  - `monday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required
  - `tuesday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required
  - `wednesday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required
  - `thursday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required
  - `friday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required
  - `saturday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required
  - `sunday` BusinessHoursDayIn, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeIn[]
      - `start` string, required
      - `end` string, required

## Response `200`

Successful Response

- BusinessHoursOut
  - `monday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required
  - `tuesday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required
  - `wednesday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required
  - `thursday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required
  - `friday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required
  - `saturday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required
  - `sunday` BusinessHoursDayOut, required
    - `mode` 'open_all_day' | 'closed' | 'custom', required
    - `ranges` TimeRangeOut[]
      - `start` string, required
      - `end` string, required

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The credential is valid but not authorized for this action.
- `404`: The resource, or the business named in the request, does not exist.
- `422`: Validation Error
- `default`: Unexpected error.

---

[API](https://skmtc.dev/izap/apis/izap-api.md) · [All operations](https://skmtc.dev/izap/apis/izap-api/llms.txt) · [OpenAPI document](https://skmtc.dev/izap/apis/izap-api/revisions/e6358c8bf5e9?raw)
