curl --request PUT \
--url https://api.goyappr.com/call-windows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inbound_enabled": true,
"outbound_enabled": true,
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}
'import requests
url = "https://api.goyappr.com/call-windows"
payload = {
"inbound_enabled": True,
"outbound_enabled": True,
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inbound_enabled: true,
outbound_enabled: true,
windows: [{day_of_week: 3, start_time: '09:00', end_time: '19:00'}]
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'inbound_enabled' => true,
'outbound_enabled' => true,
'windows' => [
[
'day_of_week' => 3,
'start_time' => '09:00',
'end_time' => '19:00'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/call-windows"
payload := strings.NewReader("{\n \"inbound_enabled\": true,\n \"outbound_enabled\": true,\n \"windows\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"09:00\",\n \"end_time\": \"19:00\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.goyappr.com/call-windows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inbound_enabled\": true,\n \"outbound_enabled\": true,\n \"windows\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"09:00\",\n \"end_time\": \"19:00\"\n }\n ]\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inbound_enabled\": true,\n \"outbound_enabled\": true,\n \"windows\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"09:00\",\n \"end_time\": \"19:00\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"timezone": "Asia/Jerusalem",
"inbound_enabled": true,
"outbound_enabled": true,
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}{
"error": "<string>",
"code": "<string>"
}Update 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 it (even as
an empty array) overwrites the whole schedule.
Window rules:
day_of_weekis 0–6 (0=Sunday … 6=Saturday).start_timeandend_timeareHH:MM(24h, workspace timezone).start_timemust be earlier thanend_time(no overnight wrap-around — use two rows on consecutive days instead).- Multiple windows per day are allowed but must not overlap.
curl --request PUT \
--url https://api.goyappr.com/call-windows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inbound_enabled": true,
"outbound_enabled": true,
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}
'import requests
url = "https://api.goyappr.com/call-windows"
payload = {
"inbound_enabled": True,
"outbound_enabled": True,
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inbound_enabled: true,
outbound_enabled: true,
windows: [{day_of_week: 3, start_time: '09:00', end_time: '19:00'}]
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'inbound_enabled' => true,
'outbound_enabled' => true,
'windows' => [
[
'day_of_week' => 3,
'start_time' => '09:00',
'end_time' => '19:00'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/call-windows"
payload := strings.NewReader("{\n \"inbound_enabled\": true,\n \"outbound_enabled\": true,\n \"windows\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"09:00\",\n \"end_time\": \"19:00\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.goyappr.com/call-windows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inbound_enabled\": true,\n \"outbound_enabled\": true,\n \"windows\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"09:00\",\n \"end_time\": \"19:00\"\n }\n ]\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inbound_enabled\": true,\n \"outbound_enabled\": true,\n \"windows\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"09:00\",\n \"end_time\": \"19:00\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"timezone": "Asia/Jerusalem",
"inbound_enabled": true,
"outbound_enabled": true,
"windows": [
{
"day_of_week": 3,
"start_time": "09:00",
"end_time": "19:00"
}
]
}{
"error": "<string>",
"code": "<string>"
}inbound_enabled, outbound_enabled, and windows:
- Omitting
windowsleaves the existing schedule unchanged. - Including
windows(even as an empty array) overwrites the entire schedule for every day of the week.
Window rules
day_of_weekis0–6(0= Sunday,6= Saturday).start_timeandend_timeareHH:MMstrings in 24-hour format. They are evaluated in the workspace timezone (companies.timezone, editable from the Company settings tab).start_timemust be strictly earlier thanend_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
# Switch to a Sun–Thu, 09:00–13:00 + 14:00–18:00 schedule. Friday + Saturday closed.
curl -X PUT "https://api.goyappr.com/call-windows" \
-H "Authorization: Bearer $YAPPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"outbound_enabled": true,
"inbound_enabled": false,
"windows": [
{ "day_of_week": 0, "start_time": "09:00", "end_time": "13:00" },
{ "day_of_week": 0, "start_time": "14:00", "end_time": "18:00" },
{ "day_of_week": 1, "start_time": "09:00", "end_time": "13:00" },
{ "day_of_week": 1, "start_time": "14:00", "end_time": "18:00" },
{ "day_of_week": 2, "start_time": "09:00", "end_time": "13:00" },
{ "day_of_week": 2, "start_time": "14:00", "end_time": "18:00" },
{ "day_of_week": 3, "start_time": "09:00", "end_time": "13:00" },
{ "day_of_week": 3, "start_time": "14:00", "end_time": "18:00" },
{ "day_of_week": 4, "start_time": "09:00", "end_time": "13:00" },
{ "day_of_week": 4, "start_time": "14:00", "end_time": "18:00" }
]
}'
Example response
The response mirrorsGET /call-windows so clients can update state without a follow-up read:
{
"timezone": "Asia/Jerusalem",
"inbound_enabled": false,
"outbound_enabled": true,
"windows": [
{ "day_of_week": 0, "start_time": "09:00", "end_time": "13:00" },
{ "day_of_week": 0, "start_time": "14:00", "end_time": "18:00" }
]
}
Disabling windows entirely
To stop gating outbound calls without losing your schedule, set the toggle off and omitwindows:
curl -X PUT "https://api.goyappr.com/call-windows" \
-H "Authorization: Bearer $YAPPR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "outbound_enabled": false }'
day_of_week. To close every day, pass "windows": [].
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_CALL_WINDOWS | Two ranges on the same day overlap, or start_time is not strictly before end_time. |
| 400 | — | day_of_week is outside 0..6, or a time is not HH:MM. |
| 401 | — | Missing or invalid API key. |
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.
Body
When true, inbound calls outside the window are hung up before answering.
When true, outbound calls outside the window are scheduled for the next opening.
Full replacement set of windows. Empty array = no allowed windows on any day.
Show child attributes
Show child attributes
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.
IANA timezone identifier. Reflects companies.timezone. Edit it in the Company settings tab.
"Asia/Jerusalem"
When true, inbound calls outside the window are hung up before answering. Default false.
When true, outbound calls outside the window are scheduled for the next opening. Default true.
Show child attributes
Show child attributes