Skip to main content
PUT
Replace company business hours

Authorizations

Authorization
string
header
required

HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).

Body

application/json
enabled
boolean
required

Whether the company business hours apply.

openingHours
object[]
required

When it is open. Several intervals per day are allowed; they must not overlap. Up to 100 intervals.

Maximum array length: 100
specialDates
object[]
required

Up to 1,000 dates.

Maximum array length: 1000
holidaysClosed
boolean
required

Closed on public holidays of the number's country. See List public holidays.

closedAction
Closed action · object
required

What callers get when closed. null is accepted only in the object a read returns for hours never saved (enabled: false), sent back as it is. With enabled: false, a closed action a read shows with soundId, voicemailBoxId or phoneNumber null is accepted too, when openingHours, specialDates, holidaysClosed and closedAction are what a read returns now (in any order): enabled is not compared, the hours switch off, also when they were on, and the stored closed action is kept. timeZone and updatedAt are ignored, as in every save. With enabled: true, or with other settings, the null is 422 VALIDATION.INVALID_FIELD.

Response

The business hours as saved.

enabled
boolean
required

Whether the company business hours apply.

timeZone
string
required
read-only

IANA time zone in which all times are read: the account time zone. Read-only.

Example:

"Europe/Bratislava"

openingHours
object[]
required

When it is open. Several intervals per day are allowed; they must not overlap.

specialDates
object[]
required
holidaysClosed
boolean
required

Closed on public holidays of the number's country. See List public holidays.

closedAction
Closed action · object
required

What callers get when closed. null while the hours were never saved. A save needs one, except when it sends back the object a read returns for hours never saved.

updatedAt
string<date-time> | null
required
read-only

Last change. Read-only. null while the hours were never saved, or when the stored date is missing or not valid.