curl --request PATCH \
--url https://platform.thena.ai/v1/users/business-hours \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"timezone": "<string>",
"routingRespectsTimezone": true,
"routingRespectsUserCapacity": true,
"fallbackSubTeam": "<string>",
"holidays": [
"25-12",
"25-12-2024"
],
"routingRespectsUserTimezone": true,
"routingRespectsUserAvailability": true,
"routingRespectsUserBusinessHours": true,
"commonDailyConfig": true,
"commonSlots": [
{
"start": "09:00",
"end": "17:00"
}
],
"dailyConfig": {
"monday": {
"isActive": true,
"slots": [
{
"start": "09:00",
"end": "17:00"
}
]
}
}
}
'import requests
url = "https://platform.thena.ai/v1/users/business-hours"
payload = {
"timezone": "<string>",
"routingRespectsTimezone": True,
"routingRespectsUserCapacity": True,
"fallbackSubTeam": "<string>",
"holidays": ["25-12", "25-12-2024"],
"routingRespectsUserTimezone": True,
"routingRespectsUserAvailability": True,
"routingRespectsUserBusinessHours": True,
"commonDailyConfig": True,
"commonSlots": [
{
"start": "09:00",
"end": "17:00"
}
],
"dailyConfig": { "monday": {
"isActive": True,
"slots": [
{
"start": "09:00",
"end": "17:00"
}
]
} }
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timezone: '<string>',
routingRespectsTimezone: true,
routingRespectsUserCapacity: true,
fallbackSubTeam: '<string>',
holidays: ['25-12', '25-12-2024'],
routingRespectsUserTimezone: true,
routingRespectsUserAvailability: true,
routingRespectsUserBusinessHours: true,
commonDailyConfig: true,
commonSlots: [{start: '09:00', end: '17:00'}],
dailyConfig: {monday: {isActive: true, slots: [{start: '09:00', end: '17:00'}]}}
})
};
fetch('https://platform.thena.ai/v1/users/business-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://platform.thena.ai/v1/users/business-hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'timezone' => '<string>',
'routingRespectsTimezone' => true,
'routingRespectsUserCapacity' => true,
'fallbackSubTeam' => '<string>',
'holidays' => [
'25-12',
'25-12-2024'
],
'routingRespectsUserTimezone' => true,
'routingRespectsUserAvailability' => true,
'routingRespectsUserBusinessHours' => true,
'commonDailyConfig' => true,
'commonSlots' => [
[
'start' => '09:00',
'end' => '17:00'
]
],
'dailyConfig' => [
'monday' => [
'isActive' => true,
'slots' => [
[
'start' => '09:00',
'end' => '17:00'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://platform.thena.ai/v1/users/business-hours"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"routingRespectsTimezone\": true,\n \"routingRespectsUserCapacity\": true,\n \"fallbackSubTeam\": \"<string>\",\n \"holidays\": [\n \"25-12\",\n \"25-12-2024\"\n ],\n \"routingRespectsUserTimezone\": true,\n \"routingRespectsUserAvailability\": true,\n \"routingRespectsUserBusinessHours\": true,\n \"commonDailyConfig\": true,\n \"commonSlots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ],\n \"dailyConfig\": {\n \"monday\": {\n \"isActive\": true,\n \"slots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://platform.thena.ai/v1/users/business-hours")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"routingRespectsTimezone\": true,\n \"routingRespectsUserCapacity\": true,\n \"fallbackSubTeam\": \"<string>\",\n \"holidays\": [\n \"25-12\",\n \"25-12-2024\"\n ],\n \"routingRespectsUserTimezone\": true,\n \"routingRespectsUserAvailability\": true,\n \"routingRespectsUserBusinessHours\": true,\n \"commonDailyConfig\": true,\n \"commonSlots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ],\n \"dailyConfig\": {\n \"monday\": {\n \"isActive\": true,\n \"slots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.thena.ai/v1/users/business-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timezone\": \"<string>\",\n \"routingRespectsTimezone\": true,\n \"routingRespectsUserCapacity\": true,\n \"fallbackSubTeam\": \"<string>\",\n \"holidays\": [\n \"25-12\",\n \"25-12-2024\"\n ],\n \"routingRespectsUserTimezone\": true,\n \"routingRespectsUserAvailability\": true,\n \"routingRespectsUserBusinessHours\": true,\n \"commonDailyConfig\": true,\n \"commonSlots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ],\n \"dailyConfig\": {\n \"monday\": {\n \"isActive\": true,\n \"slots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": {
"timezone": "<string>",
"userId": "<string>",
"dailyConfig": {
"monday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"tuesday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"wednesday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"thursday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"friday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"saturday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"sunday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
}
},
"commonDailyConfig": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Update your working hours!
curl --request PATCH \
--url https://platform.thena.ai/v1/users/business-hours \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"timezone": "<string>",
"routingRespectsTimezone": true,
"routingRespectsUserCapacity": true,
"fallbackSubTeam": "<string>",
"holidays": [
"25-12",
"25-12-2024"
],
"routingRespectsUserTimezone": true,
"routingRespectsUserAvailability": true,
"routingRespectsUserBusinessHours": true,
"commonDailyConfig": true,
"commonSlots": [
{
"start": "09:00",
"end": "17:00"
}
],
"dailyConfig": {
"monday": {
"isActive": true,
"slots": [
{
"start": "09:00",
"end": "17:00"
}
]
}
}
}
'import requests
url = "https://platform.thena.ai/v1/users/business-hours"
payload = {
"timezone": "<string>",
"routingRespectsTimezone": True,
"routingRespectsUserCapacity": True,
"fallbackSubTeam": "<string>",
"holidays": ["25-12", "25-12-2024"],
"routingRespectsUserTimezone": True,
"routingRespectsUserAvailability": True,
"routingRespectsUserBusinessHours": True,
"commonDailyConfig": True,
"commonSlots": [
{
"start": "09:00",
"end": "17:00"
}
],
"dailyConfig": { "monday": {
"isActive": True,
"slots": [
{
"start": "09:00",
"end": "17:00"
}
]
} }
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timezone: '<string>',
routingRespectsTimezone: true,
routingRespectsUserCapacity: true,
fallbackSubTeam: '<string>',
holidays: ['25-12', '25-12-2024'],
routingRespectsUserTimezone: true,
routingRespectsUserAvailability: true,
routingRespectsUserBusinessHours: true,
commonDailyConfig: true,
commonSlots: [{start: '09:00', end: '17:00'}],
dailyConfig: {monday: {isActive: true, slots: [{start: '09:00', end: '17:00'}]}}
})
};
fetch('https://platform.thena.ai/v1/users/business-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://platform.thena.ai/v1/users/business-hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'timezone' => '<string>',
'routingRespectsTimezone' => true,
'routingRespectsUserCapacity' => true,
'fallbackSubTeam' => '<string>',
'holidays' => [
'25-12',
'25-12-2024'
],
'routingRespectsUserTimezone' => true,
'routingRespectsUserAvailability' => true,
'routingRespectsUserBusinessHours' => true,
'commonDailyConfig' => true,
'commonSlots' => [
[
'start' => '09:00',
'end' => '17:00'
]
],
'dailyConfig' => [
'monday' => [
'isActive' => true,
'slots' => [
[
'start' => '09:00',
'end' => '17:00'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://platform.thena.ai/v1/users/business-hours"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"routingRespectsTimezone\": true,\n \"routingRespectsUserCapacity\": true,\n \"fallbackSubTeam\": \"<string>\",\n \"holidays\": [\n \"25-12\",\n \"25-12-2024\"\n ],\n \"routingRespectsUserTimezone\": true,\n \"routingRespectsUserAvailability\": true,\n \"routingRespectsUserBusinessHours\": true,\n \"commonDailyConfig\": true,\n \"commonSlots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ],\n \"dailyConfig\": {\n \"monday\": {\n \"isActive\": true,\n \"slots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://platform.thena.ai/v1/users/business-hours")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"routingRespectsTimezone\": true,\n \"routingRespectsUserCapacity\": true,\n \"fallbackSubTeam\": \"<string>\",\n \"holidays\": [\n \"25-12\",\n \"25-12-2024\"\n ],\n \"routingRespectsUserTimezone\": true,\n \"routingRespectsUserAvailability\": true,\n \"routingRespectsUserBusinessHours\": true,\n \"commonDailyConfig\": true,\n \"commonSlots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ],\n \"dailyConfig\": {\n \"monday\": {\n \"isActive\": true,\n \"slots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.thena.ai/v1/users/business-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timezone\": \"<string>\",\n \"routingRespectsTimezone\": true,\n \"routingRespectsUserCapacity\": true,\n \"fallbackSubTeam\": \"<string>\",\n \"holidays\": [\n \"25-12\",\n \"25-12-2024\"\n ],\n \"routingRespectsUserTimezone\": true,\n \"routingRespectsUserAvailability\": true,\n \"routingRespectsUserBusinessHours\": true,\n \"commonDailyConfig\": true,\n \"commonSlots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ],\n \"dailyConfig\": {\n \"monday\": {\n \"isActive\": true,\n \"slots\": [\n {\n \"start\": \"09:00\",\n \"end\": \"17:00\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": {
"timezone": "<string>",
"userId": "<string>",
"dailyConfig": {
"monday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"tuesday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"wednesday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"thursday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"friday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"saturday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
},
"sunday": {
"isActive": true,
"slots": [
{
"start": "10:00",
"end": "18:00"
}
]
}
},
"commonDailyConfig": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Authorizations
Enter your API key
Body
The timezone of the team
Whether the routing rules respect the timezone for the teams
Whether the routing rules respect the user capacity for the teams
The fallback sub team of the team
The dates of the team's holidays
["25-12", "25-12-2024"]
Whether the routing rules respect the user timezone for the teams
Whether the routing rules respect the user availability for the teams
Whether the routing rules respect the user business hours for the teams
The user routing strategy for the team
manual, round_robin Whether the team uses common daily config
The common slots for the team
[{ "start": "09:00", "end": "17:00" }]
The business hours of the team
Show child attributes
Show child attributes
{
"monday": {
"isActive": true,
"slots": [{ "start": "09:00", "end": "17:00" }]
}
}
Response
Operation successful
The status of the response
The message of the response
The timestamp of the response
The response for create/update/delete user configurations
Show child attributes
Show child attributes