Skip to main content
PUT
Replace call time windows
Atomically replaces the call window configuration. Send any combination of inbound_enabled, outbound_enabled, and windows:
  • Omitting windows leaves the existing schedule unchanged.
  • Including windows (even as an empty array) overwrites the entire schedule for every day of the week.
Any authenticated API key for the workspace can call this — no specific scope is required.

Window rules

  • day_of_week is 06 (0 = Sunday, 6 = Saturday).
  • start_time and end_time are HH:MM strings in 24-hour format. They are evaluated in the workspace timezone (companies.timezone, editable from the Company settings tab).
  • start_time must be strictly earlier than end_time — there is no overnight wrap-around. To express a window that crosses midnight, use two entries on consecutive days (e.g. { day_of_week: 4, start_time: "22:00", end_time: "23:59" } and { day_of_week: 5, start_time: "00:00", end_time: "02:00" }).
  • Multiple windows per day are allowed but they must not overlap.

Example request

Example response

The response mirrors GET /call-windows so clients can update state without a follow-up read:

Disabling windows entirely

To stop gating outbound calls without losing your schedule, set the toggle off and omit windows:
To make a day fully closed, simply omit any windows for that day_of_week. To close every day, pass "windows": [].

Errors

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.

Body

application/json
inbound_enabled
boolean

When true, inbound calls outside the window are hung up before answering.

outbound_enabled
boolean

When true, outbound calls outside the window are scheduled for the next opening.

windows
object[]

Full replacement set of windows. Empty array = no allowed windows on any day.

Response

Updated configuration

Company-level configuration that gates inbound and outbound calls by time-of-day. When outbound_enabled is true, outbound API requests placed outside any allowed window are deferred — the response is 202 Accepted with status: "scheduled" and a scheduled_for timestamp marking the next window opening. When inbound_enabled is true, inbound calls received outside any allowed window are hung up before being answered (no call_logs row is created).

A day with no windows is a closed day for whichever directions are enforced. The default schedule (seeded for every company) is Sunday through Thursday 09:00–19:00 plus Friday 09:00–11:30; Saturday is closed.

timezone
string

IANA timezone identifier. Reflects companies.timezone. Edit it in the Company settings tab.

Example:

"Asia/Jerusalem"

inbound_enabled
boolean

When true, inbound calls outside the window are hung up before answering. Default false.

outbound_enabled
boolean

When true, outbound calls outside the window are scheduled for the next opening. Default true.

windows
object[]