Skip to main content
GET
Get call time windows
Returns the company’s call time window configuration: which directions enforcement is on for, the workspace timezone, the optional after-hours message, and every allowed window grouped by day of week. Phone calls placed (or received) outside the configured window are gated automatically:
  • Outbound — when outbound_enabled is true and the call falls outside any allowed window, the create-call request returns 202 Accepted with status: "scheduled" and a scheduled_for timestamp marking the next window opening. The platform places the call automatically at that time.
  • Inbound — when inbound_enabled is true and the call lands outside any allowed window, the call is ended before being answered. No call_logs row is created and no minutes are charged.
A day with no windows is closed 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.

Windows apply to phone calls, not browser sessions

Both toggles gate telephony. A browser session minted with POST /calls {"type": "web"} is a rehearsal — you or a visitor testing the agent on a page — so it is never gated: the mint returns 201 immediately whatever the schedule says, and closing every window does not change that. If you need a browser call to refuse out of hours, read GET /call-windows and decide in your own page before you mint.

The after-hours message

closed_message is what an inbound caller will hear when the window is closed, spoken before the call ends. Leave it null (the default) and the call is ended in silence, as it always was. It is workspace-wide, holds up to 500 characters, and only matters while inbound_enabled is true.
The field is live now — it is stored, returned here, and editable in the dashboard — but calls do not speak it yet: an inbound call outside the window is still ended in silence. Set it whenever you like; it starts being spoken with the voice release that picks it up, and nothing about your call handling changes before then.
Write the hours once, here. An agent prompt that recites its own opening hours does not enforce anything — the window does — and two copies of the hours drift apart. updated_at is the version of the whole record — hours, toggles and message together. Hold on to it: sending it back as expected_updated_at on PUT /call-windows is what stops you replacing a change somebody made after you read this. Any authenticated API key for the workspace can read this — no specific scope is required.

Example request

Example response

day_of_week follows the standard Sunday-first convention: 0 is Sunday, 6 is Saturday. Times are HH:MM in 24-hour notation, evaluated in the workspace timezone, timezone above — change it with timezone on PUT /call-windows, or under Settings → Workspace clock in the dashboard.

Was the clock set?

A workspace starts on UTC, so "timezone": "UTC" alone cannot say whether anyone chose it. timezone_set can: It turns true on any write that names timezone — on PUT /call-windows or in the dashboard — even when the value is the one already stored.

Errors

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Response

Current configuration

Company-level configuration that gates phone 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 ended before being answered (no call_logs row is created).

Browser sessions minted with POST /calls {"type":"web"} are rehearsals, not customer traffic: they are never gated by either toggle and always mint immediately, whatever the schedule says.

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

The workspace's clock, as an IANA timezone name. UTC until someone sets it (timezone_set says which). Set it with timezone on PUT /call-windows, or under Settings → Workspace clock.

Example:

"Asia/Jerusalem"

timezone_set
boolean
read-only

Whether the workspace chose its clock. false means timezone is the UTC default nobody picked: the calling hours, relative dates and consumption days are still read on UTC, and the dashboard shows times on each reader's own browser clock (labelled as such) until the clock is set. true once any write names timezone, including UTC on purpose.

Example:

true

inbound_enabled
boolean

When true, inbound phone calls outside the window are ended before an agent answers. Default false.

outbound_enabled
boolean

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

closed_message
string | null

Optional message an inbound caller will hear when inbound_enabled is true and the window is closed, spoken before the call ends. null (the default) ends the call without saying anything. Blank strings are stored as null. The field is stored and returned today; calls do not speak it yet, so an out-of-hours call is still ended in silence until the voice release that picks it up.

Maximum string length: 500
Example:

"You've reached us outside our hours. We're here Sunday to Thursday, nine to seven."

updated_at
string<date-time>

The version of this whole record — the hours, the toggles and the message together. Send it back as expected_updated_at on a PUT and the write is refused with 409 CALL_WINDOWS_CONFLICT if anyone changed the hours in between, instead of silently replacing what they wrote. These settings are workspace-wide, so the other writer may be a colleague's dashboard tab.

Example:

"2026-09-22T11:30:00.000Z"

windows
object[]