> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getvoxai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getvoxai.com/_mcp/server.

# Update agent schedule

PUT https://api.getvoxai.com/v1/agents/{agent_id}/schedule
Content-Type: application/json

Changes the business hours, the hours of the services and the answering mode of an agent, and returns the schedule as it is after the change. Only the fields you send change, and you must send at least one; `changed` is `false` when nothing was different, and then nothing is written. A day has at most two intervals, in order and not overlapping, and an interval never crosses midnight. Services are matched by name and must already exist: they are created with the agent script. In `outside_hours_only` mode a `forward_number` is required (an Italian landline, mobile or toll-free (800, 803) number), and the plan must include the transfer of a call to a person. The instructions of the agent that mention the hours are updated with the new hours. Required scope: `agents:operate`. With a test key (`vx_test_`) it is simulated: nothing real happens and nothing is billed. Accepts an optional `Idempotency-Key` header. Retriable: when the operation itself fails with a `429`, a `5xx` or a temporary `409`, the key is released and a retry with the same key runs the operation again; with no response at all, a retry with the same key returns the first outcome or runs the operation again. A `429 rate_limited` from the request limit and `409 request_in_progress` come before the operation and leave the key as it is: retry with the same key.

Reference: https://docs.getvoxai.com/api-reference/agents/schedule-set

## Authentication

- `Authorization` header (bearer token, required) — API key created by an Owner or Admin of the organization. Never in the query string.

## Request

### Path parameters

- `agent_id` (string, required) — Id of an agent of the organization, as returned by `GET /agents`.

### Headers

- `VoxAI-Version` (enum, optional) — API version for this request; defaults to the version the key is pinned to.
  - Allowed values: `2026-10-01`
- `Idempotency-Key` (string, optional) — A unique value you generate for each new operation (16 to 64 letters, digits, hyphen or underscore; a UUID works). Repeating the same request with the same key within 24 hours returns the first response and does nothing again, when that response was a success or a `4xx` error the same request would always get again (not `429`, and not the temporary `409` codes `request_in_progress`, `caller_has_active_call` and `caller_request_in_progress`: for those, and for a `5xx`, see the note on retrying in the operation); the same key with a different request is refused with `idempotency_key_reused`.

### Body (application/json)

This endpoint expects an object.

- `mode` (enum, optional) — `always` (default): the agent answers every inbound call; the schedule only tells it whether the business is open. `outside_hours_only`: the agent answers only when the business is closed (outside the schedule or during a closure); while the business is open, inbound calls are forwarded to `forward_number` before the agent answers (if the forward fails or nobody answers there, the agent answers).
  - Allowed values: `always`, `outside_hours_only`
- `forward_number` (string, optional, nullable) — The business number to forward inbound calls to while the business is open; `outside_hours_only` needs one. `null` removes it, which is not allowed in `outside_hours_only` mode.
- `weekly` (AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeekly, optional, nullable) — The business hours; `null` removes them. The first service gets the same hours.
- `services` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItems, optional) — Hours of services already declared for the agent, matched by name; each item replaces the hours of that service. An unknown name is refused. Changing the first service also sets the business hours to the same value.

## Response

### 200

Successful response.

- `object` ("agent_schedule", required) — Always `agent_schedule`.
- `agent_id` (string, required) — Id of the agent.
- `timezone` (string, required) — The agent timezone (IANA), set with the agent; the schedule and the closure dates are local to it.
- `mode` (enum, required) — `always` (default): the agent answers every inbound call; the schedule only tells it whether the business is open. `outside_hours_only`: the agent answers only when the business is closed (outside the schedule or during a closure); while the business is open, inbound calls are forwarded to `forward_number` before the agent answers (if the forward fails or nobody answers there, the agent answers).
  - Allowed values: `always`, `outside_hours_only`
- `forward_number` (string, required, nullable) — The business number inbound calls are forwarded to while the business is open; `null` when none is set.
- `weekly` (AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeekly, required, nullable) — The business hours; `null`: none.
- `services` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItems, required) — The business is open when its hours or the hours of at least one service are open. `weekly: null`: the service has no hours of its own.
- `valid` (boolean, required) — `false` when hours saved before these rules cannot be evaluated: they do not count until they are saved again.
- `answer_outside_hours` (boolean, required) — What the agent does when the business is closed (it books appointments too, or only says it is closed). Set with the agent script in the app.
- `open_now` (boolean, required) — Whether the business is open right now (hours of the business and of its services, and today's closures).
- `answers_now` (boolean, required) — Whether the agent would answer an inbound call right now (always in `always` mode; when the business is closed in `outside_hours_only`). Not the suspension.
- `simulated` (boolean, required) — `true` when the request was made with a test key: every check ran but nothing was changed. `false` with a live key.
- `changed` (boolean, optional) — Only on `PUT`: whether something was different.

## Errors

### 400 Bad Request Error

Possible errors: * `invalid_api_version`: The `VoxAI-Version` header names a version that does not exist. Use one of the versions listed in the `VoxAI-Version` parameter, or omit the header to use the version the key is pinned to. * `invalid_request`: The path, query or body does not match the schema of the operation: a missing or unknown field, a wrong type, a value out of range. Fix the request. `details` lists each problem as `{ location, path, message }`: `location` is `params`, `query` or `body` and `path` points to the field.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 401 Unauthorized Error

Possible errors: - `invalid_api_key`: The `Authorization` header is missing, malformed, or carries a key that does not exist, was revoked or has expired. Send `Authorization: Bearer vx_live_…` (or `vx_test_…`) with an active key. Create a new key in the app if this one expired.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 403 Forbidden Error

Possible errors: - `feature_not_available`: The plan of the organization does not include the API, or the feature this operation needs. Upgrade the plan in the app. Reads and deletions stay available after a downgrade. - `insufficient_scope`: The key does not have the scope this operation requires (written in the description of the operation). Create a key with the required scope (an Owner or Admin can do it in the app), or ask for the scope to be added. - `ip_not_allowed`: The key has an IP allow-list and the request comes from an address that is not on it. Call from an allowed address, or add this address to the key in the app. - `organization_suspended`: The organization that owns the key is suspended. Contact the organization Owner: nothing can be done through the API until the organization is active again.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 404 Not Found Error

Possible errors: - `not_found`: The resource does not exist, or it belongs to another organization: the two cases give the same answer on purpose. Check the id. Ids come from the list operations of the same organization.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 409 Conflict Error

Possible errors: - `agent_configuration_unreadable`: The configuration of the agent cannot be read, so it cannot be changed safely. Contact support with the `requestId`. - `concurrent_modification`: The resource (an agent or a webhook endpoint) was changed by someone else between the read and the write. Read the resource again and retry with a new `Idempotency-Key`. - `request_in_progress`: A request with the same `Idempotency-Key` is still running. Wait a few seconds and retry with the same key: you will get the outcome of the first request.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 422 Unprocessable Entity Error

Possible errors: - `idempotency_key_reused`: The same `Idempotency-Key` was already used in the last 24 hours with a different request (other operation, path or body). Use a new key for a new request. Reuse a key only to repeat exactly the same request.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 429 Too Many Requests Error

Possible errors: - `rate_limited`: Too many requests: over the per-minute limit of this key or of the whole organization (see `rate_limits` in `GET /me`), or over a limit of the operation itself, such as the hourly limit on webhook tests and resends. Wait for the number of seconds in the `Retry-After` header, then retry. Spread requests over time.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 500 Internal Server Error

Possible errors: - `internal_error`: An unexpected error on our side. Retry once after a few seconds. For writes marked as retriable, retry with the same `Idempotency-Key`, so the operation is never done twice; for the other writes, first read the state of the resource, then retry with a NEW key only if the operation did not happen. If it persists, contact support with the `requestId`.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

### 503 Service Unavailable Error

Possible errors: - `api_not_configured`: The API is not enabled on this service. Contact support.

- `error` (string, required) — Human-readable message in English.
- `code` (string, required) — Stable machine-readable code; decide what to do from this, never from the message.
- `requestId` (string, required) — Same value as the X-Request-Id response header; quote it when contacting support.
- `details` (any, optional) — Extra information, only on some codes. For `invalid_request` it is a list of `{ location, path, message }`, one per field (`location` is `params`, `query` or `body`) with a problem; for the other codes its fields depend on the code (for example `details.limit`).

## Types

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeekly

Local times in the agent timezone (`HH:MM`). An interval never crosses midnight: write a night shift as `22:00-24:00` and `00:00-02:00` of the next day. A week without intervals means always closed.

- `monday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyMondayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `tuesday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyTuesdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `wednesday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyWednesdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `thursday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyThursdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `friday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyFridayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `saturday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklySaturdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `sunday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklySundayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItems

- `name` (string, required) — A service already declared for the agent (services are created with the agent script).
- `weekly` (AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeekly, required) — Local times in the agent timezone (`HH:MM`). An interval never crosses midnight: write a night shift as `22:00-24:00` and `00:00-02:00` of the next day. A week without intervals means always closed.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeekly

The business hours; `null`: none.

- `monday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyMondayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `tuesday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyTuesdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `wednesday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyWednesdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `thursday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyThursdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `friday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyFridayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `saturday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklySaturdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `sunday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklySundayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItems

- `name` (string, required) — Name of the service.
- `weekly` (AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeekly, required, nullable) — The hours of the service; `null`: the service has no hours of its own.
- `valid` (boolean, required) — `false` when the hours saved for this service cannot be evaluated (they were saved before these rules): they do not count until they are saved again.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyMondayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyTuesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyWednesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyThursdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklyFridayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklySaturdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaWeeklySundayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeekly

Local times in the agent timezone (`HH:MM`). An interval never crosses midnight: write a night shift as `22:00-24:00` and `00:00-02:00` of the next day. A week without intervals means always closed.

- `monday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyMondayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `tuesday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyTuesdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `wednesday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyWednesdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `thursday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyThursdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `friday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyFridayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `saturday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklySaturdayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `sunday` (list of AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklySundayItems, optional) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyMondayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyTuesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyWednesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyThursdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklyFridayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklySaturdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaWeeklySundayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeekly

The hours of the service; `null`: the service has no hours of its own.

- `monday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyMondayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `tuesday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyTuesdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `wednesday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyWednesdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `thursday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyThursdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `friday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyFridayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `saturday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklySaturdayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.
- `sunday` (list of AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklySundayItems, required) — At most two intervals, in order and not overlapping; an empty list (or a missing day) means closed that day.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyMondayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyTuesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyWednesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyThursdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklyFridayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklySaturdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutRequestBodyContentApplicationJsonSchemaServicesItemsWeeklySundayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyMondayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyTuesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyWednesdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyThursdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklyFridayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklySaturdayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

### AgentsAgentIdSchedulePutResponsesContentApplicationJsonSchemaServicesItemsWeeklySundayItems

- `start` (string, required) — When the interval starts, `HH:MM`, local time of the agent.
- `end` (string, required) — When the interval ends, `HH:MM`, local time of the agent. It must be after `start`; `24:00` means until midnight.

## Examples

**Request**

```json
{
  "mode": "outside_hours_only",
  "forward_number": "+390212345678",
  "weekly": {
    "monday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "tuesday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "wednesday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "thursday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "friday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ]
  }
}
```

**Response**

```json
{
  "object": "agent_schedule",
  "agent_id": "reception-studio-rossi",
  "timezone": "Europe/Rome",
  "mode": "outside_hours_only",
  "forward_number": "+390212345678",
  "weekly": {
    "monday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "tuesday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "wednesday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "thursday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "friday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "saturday": [],
    "sunday": []
  },
  "services": [
    {
      "name": "Consultation",
      "weekly": {
        "monday": [
          {
            "start": "09:00",
            "end": "13:00"
          }
        ],
        "tuesday": [
          {
            "start": "09:00",
            "end": "13:00"
          },
          {
            "start": "14:30",
            "end": "18:30"
          }
        ],
        "wednesday": [
          {
            "start": "09:00",
            "end": "13:00"
          }
        ],
        "thursday": [
          {
            "start": "09:00",
            "end": "13:00"
          },
          {
            "start": "14:30",
            "end": "18:30"
          }
        ],
        "friday": [],
        "saturday": [],
        "sunday": []
      },
      "valid": true
    }
  ],
  "valid": true,
  "answer_outside_hours": true,
  "open_now": false,
  "answers_now": true,
  "simulated": false,
  "changed": true
}
```

**SDK Code**

```python
import requests

url = "https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule"

payload = {
    "mode": "outside_hours_only",
    "forward_number": "+390212345678",
    "weekly": {
        "monday": [
            {
                "start": "09:00",
                "end": "13:00"
            },
            {
                "start": "14:30",
                "end": "18:30"
            }
        ],
        "tuesday": [
            {
                "start": "09:00",
                "end": "13:00"
            },
            {
                "start": "14:30",
                "end": "18:30"
            }
        ],
        "wednesday": [
            {
                "start": "09:00",
                "end": "13:00"
            },
            {
                "start": "14:30",
                "end": "18:30"
            }
        ],
        "thursday": [
            {
                "start": "09:00",
                "end": "13:00"
            },
            {
                "start": "14:30",
                "end": "18:30"
            }
        ],
        "friday": [
            {
                "start": "09:00",
                "end": "13:00"
            },
            {
                "start": "14:30",
                "end": "18:30"
            }
        ]
    }
}
headers = {
    "Idempotency-Key": "3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule';
const options = {
  method: 'PUT',
  headers: {
    'Idempotency-Key': '3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"mode":"outside_hours_only","forward_number":"+390212345678","weekly":{"monday":[{"start":"09:00","end":"13:00"},{"start":"14:30","end":"18:30"}],"tuesday":[{"start":"09:00","end":"13:00"},{"start":"14:30","end":"18:30"}],"wednesday":[{"start":"09:00","end":"13:00"},{"start":"14:30","end":"18:30"}],"thursday":[{"start":"09:00","end":"13:00"},{"start":"14:30","end":"18:30"}],"friday":[{"start":"09:00","end":"13:00"},{"start":"14:30","end":"18:30"}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule"

	payload := strings.NewReader("{\n  \"mode\": \"outside_hours_only\",\n  \"forward_number\": \"+390212345678\",\n  \"weekly\": {\n    \"monday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"tuesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"wednesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"thursday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"friday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Idempotency-Key", "3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"mode\": \"outside_hours_only\",\n  \"forward_number\": \"+390212345678\",\n  \"weekly\": {\n    \"monday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"tuesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"wednesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"thursday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"friday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule")
  .header("Idempotency-Key", "3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"mode\": \"outside_hours_only\",\n  \"forward_number\": \"+390212345678\",\n  \"weekly\": {\n    \"monday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"tuesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"wednesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"thursday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"friday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ]\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule', [
  'body' => '{
  "mode": "outside_hours_only",
  "forward_number": "+390212345678",
  "weekly": {
    "monday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "tuesday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "wednesday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "thursday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ],
    "friday": [
      {
        "start": "09:00",
        "end": "13:00"
      },
      {
        "start": "14:30",
        "end": "18:30"
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => '3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule");
var request = new RestRequest(Method.PUT);
request.AddHeader("Idempotency-Key", "3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"mode\": \"outside_hours_only\",\n  \"forward_number\": \"+390212345678\",\n  \"weekly\": {\n    \"monday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"tuesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"wednesday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"thursday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ],\n    \"friday\": [\n      {\n        \"start\": \"09:00\",\n        \"end\": \"13:00\"\n      },\n      {\n        \"start\": \"14:30\",\n        \"end\": \"18:30\"\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Idempotency-Key": "3f1c9a72-5d4e-4b8a-9c6f-0e2d7a1b4c58",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "mode": "outside_hours_only",
  "forward_number": "+390212345678",
  "weekly": [
    "monday": [
      [
        "start": "09:00",
        "end": "13:00"
      ],
      [
        "start": "14:30",
        "end": "18:30"
      ]
    ],
    "tuesday": [
      [
        "start": "09:00",
        "end": "13:00"
      ],
      [
        "start": "14:30",
        "end": "18:30"
      ]
    ],
    "wednesday": [
      [
        "start": "09:00",
        "end": "13:00"
      ],
      [
        "start": "14:30",
        "end": "18:30"
      ]
    ],
    "thursday": [
      [
        "start": "09:00",
        "end": "13:00"
      ],
      [
        "start": "14:30",
        "end": "18:30"
      ]
    ],
    "friday": [
      [
        "start": "09:00",
        "end": "13:00"
      ],
      [
        "start": "14:30",
        "end": "18:30"
      ]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getvoxai.com/v1/agents/reception-studio-rossi/schedule")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```