curl --request GET \
--url https://api.goyappr.com/call-windows \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/call-windows"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/call-windows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/call-windows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/call-windows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goyappr.com/call-windows")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/call-windows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"timezone": "Asia/Jerusalem",
"timezone_set": true,
"inbound_enabled": true,
"outbound_enabled": true,
"closed_message": "You've reached us outside our hours. We're here Sunday to Thursday, nine to seven.",
"updated_at": "2026-09-22T11:30:00.000Z",
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}Get call time windows
Returns the company’s call time window configuration: which directions the window is enforced on, the workspace timezone, the optional after-hours message, and every allowed window grouped by day of week.
Windows gate phone calls only. Browser sessions minted with
POST /calls {"type":"web"} are never gated.
curl --request GET \
--url https://api.goyappr.com/call-windows \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/call-windows"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/call-windows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/call-windows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/call-windows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goyappr.com/call-windows")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/call-windows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"timezone": "Asia/Jerusalem",
"timezone_set": true,
"inbound_enabled": true,
"outbound_enabled": true,
"closed_message": "You've reached us outside our hours. We're here Sunday to Thursday, nine to seven.",
"updated_at": "2026-09-22T11:30:00.000Z",
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}- Outbound — when
outbound_enabledistrueand the call falls outside any allowed window, the create-call request returns202 Acceptedwithstatus: "scheduled"and ascheduled_fortimestamp marking the next window opening. The platform places the call automatically at that time. - Inbound — when
inbound_enabledistrueand the call lands outside any allowed window, the call is ended before being answered. Nocall_logsrow is created and no minutes are charged.
Windows apply to phone calls, not browser sessions
Both toggles gate telephony. A browser session minted withPOST /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.
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
curl "https://api.goyappr.com/call-windows" \
-H "Authorization: Bearer $YAPPR_API_KEY"
Example response
{
"timezone": "Asia/Jerusalem",
"timezone_set": true,
"inbound_enabled": false,
"outbound_enabled": true,
"closed_message": null,
"updated_at": "2026-09-22T11:30:00.000Z",
"windows": [
{ "day_of_week": 0, "start_time": "09:00", "end_time": "19:00" },
{ "day_of_week": 1, "start_time": "09:00", "end_time": "19:00" },
{ "day_of_week": 2, "start_time": "09:00", "end_time": "19:00" },
{ "day_of_week": 3, "start_time": "09:00", "end_time": "19:00" },
{ "day_of_week": 4, "start_time": "09:00", "end_time": "19:00" },
{ "day_of_week": 5, "start_time": "09:00", "end_time": "11:30" }
]
}
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 onUTC, so "timezone": "UTC" alone cannot say whether anyone chose it. timezone_set can:
timezone | timezone_set | Meaning |
|---|---|---|
UTC | false | Never set. The hours, collected dates and consumption days are read on UTC; the dashboard shows each reader times on their own browser’s clock, labelled, until it is set. |
UTC | true | UTC chosen on purpose. |
| any other | true | That zone was chosen. |
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
| HTTP | Code | When |
|---|---|---|
| 400 | CALL_WINDOWS_QUERY_INVALID | A query parameter: this route reads none, and anything sent is refused by name rather than ignored. |
| 401 | — | Missing or invalid API key. |
Authorizations
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.
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.
true
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.
500"You've reached us outside our hours. We're here Sunday to Thursday, nine to seven."
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.
"2026-09-22T11:30:00.000Z"