curl --request POST \
--url https://api.helloannie.com/v1/organizations/{orgId}/office-hours \
--header 'Content-Type: application/json' \
--data '
{
"isClosed": true,
"open": "<string>",
"close": "<string>",
"breaks": [
{
"start": "<string>",
"end": "<string>",
"reason": "<string>",
"greeting": "<string>"
}
]
}
'import requests
url = "https://api.helloannie.com/v1/organizations/{orgId}/office-hours"
payload = {
"isClosed": True,
"open": "<string>",
"close": "<string>",
"breaks": [
{
"start": "<string>",
"end": "<string>",
"reason": "<string>",
"greeting": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
isClosed: true,
open: '<string>',
close: '<string>',
breaks: [{start: '<string>', end: '<string>', reason: '<string>', greeting: '<string>'}]
})
};
fetch('https://api.helloannie.com/v1/organizations/{orgId}/office-hours', 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.helloannie.com/v1/organizations/{orgId}/office-hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'isClosed' => true,
'open' => '<string>',
'close' => '<string>',
'breaks' => [
[
'start' => '<string>',
'end' => '<string>',
'reason' => '<string>',
'greeting' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.helloannie.com/v1/organizations/{orgId}/office-hours"
payload := strings.NewReader("{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\",\n \"breaks\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"reason\": \"<string>\",\n \"greeting\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.helloannie.com/v1/organizations/{orgId}/office-hours")
.header("Content-Type", "application/json")
.body("{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\",\n \"breaks\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"reason\": \"<string>\",\n \"greeting\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helloannie.com/v1/organizations/{orgId}/office-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\",\n \"breaks\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"reason\": \"<string>\",\n \"greeting\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"dayOfWeek": "MONDAY",
"isClosed": true,
"open": "<string>",
"close": "<string>",
"breaks": [
{
"start": "<string>",
"end": "<string>",
"reason": "<string>",
"greeting": "<string>"
}
]
}
}{
"success": false,
"data": {},
"message": "<string>"
}{
"success": false,
"data": {},
"message": "<string>"
}{
"success": false,
"data": {},
"message": "<string>"
}Set office hours
Create or update office hours for a specific day of the week. Set isClosed to true to mark the office as closed on that day. When isClosed is false, open and close times are required. Recurring breaks within this day’s office hours, in the organization’s timezone. During a break, inbound phone calls treat the office as closed for template feature availability (CLOSED features apply; OPEN features do not). The break’s custom greeting overrides the closed greeting. Date-specific office closures take precedence over breaks. Each break requires start, end, reason, and greeting. Breaks must have start before end, be bounded by open/close, and must not overlap; adjacent breaks are allowed. Omitting breaks preserves existing breaks; [] clears them. Retained breaks must fit any updated office hours.
curl --request POST \
--url https://api.helloannie.com/v1/organizations/{orgId}/office-hours \
--header 'Content-Type: application/json' \
--data '
{
"isClosed": true,
"open": "<string>",
"close": "<string>",
"breaks": [
{
"start": "<string>",
"end": "<string>",
"reason": "<string>",
"greeting": "<string>"
}
]
}
'import requests
url = "https://api.helloannie.com/v1/organizations/{orgId}/office-hours"
payload = {
"isClosed": True,
"open": "<string>",
"close": "<string>",
"breaks": [
{
"start": "<string>",
"end": "<string>",
"reason": "<string>",
"greeting": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
isClosed: true,
open: '<string>',
close: '<string>',
breaks: [{start: '<string>', end: '<string>', reason: '<string>', greeting: '<string>'}]
})
};
fetch('https://api.helloannie.com/v1/organizations/{orgId}/office-hours', 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.helloannie.com/v1/organizations/{orgId}/office-hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'isClosed' => true,
'open' => '<string>',
'close' => '<string>',
'breaks' => [
[
'start' => '<string>',
'end' => '<string>',
'reason' => '<string>',
'greeting' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.helloannie.com/v1/organizations/{orgId}/office-hours"
payload := strings.NewReader("{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\",\n \"breaks\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"reason\": \"<string>\",\n \"greeting\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.helloannie.com/v1/organizations/{orgId}/office-hours")
.header("Content-Type", "application/json")
.body("{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\",\n \"breaks\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"reason\": \"<string>\",\n \"greeting\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.helloannie.com/v1/organizations/{orgId}/office-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"isClosed\": true,\n \"open\": \"<string>\",\n \"close\": \"<string>\",\n \"breaks\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"reason\": \"<string>\",\n \"greeting\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"dayOfWeek": "MONDAY",
"isClosed": true,
"open": "<string>",
"close": "<string>",
"breaks": [
{
"start": "<string>",
"end": "<string>",
"reason": "<string>",
"greeting": "<string>"
}
]
}
}{
"success": false,
"data": {},
"message": "<string>"
}{
"success": false,
"data": {},
"message": "<string>"
}{
"success": false,
"data": {},
"message": "<string>"
}Path Parameters
The ID of the organization
Body
Payload to create or update office hours for a specific day
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY Whether the office is closed on this day. When true, open and close times are not required.
Opening time in HH:mm format (e.g., '09:00'). Required when isClosed is false.
^([01]?[0-9]|2[0-3]):[0-5][0-9]$Closing time in HH:mm format (e.g., '17:00'). Required when isClosed is false.
^([01]?[0-9]|2[0-3]):[0-5][0-9]$Recurring breaks within this day's office hours, in the organization's timezone. During a break, inbound phone calls treat the office as closed for template feature availability (CLOSED features apply; OPEN features do not). The break's custom greeting overrides the closed greeting. Date-specific office closures take precedence over breaks. Every break requires start, end, reason, and greeting. Start must precede end; breaks must be within open/close and cannot overlap. Omit to preserve existing breaks; send [] to clear them. Nonempty breaks are not allowed when isClosed is true.
Show child attributes
Show child attributes