Version-check and update answering-policy business hours or holidays
PATCH
/v1/mobile/receptionist/numbers/{number_id}/schedule
const url = 'https://api.vocapable.com/v1/mobile/receptionist/numbers/example/schedule';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expected_version":1,"business_hours":{"additionalProperty":[{"start":"example","end":"example"}]},"holiday_dates":["2026-04-15"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.vocapable.com/v1/mobile/receptionist/numbers/example/schedule \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expected_version": 1, "business_hours": { "additionalProperty": [ { "start": "example", "end": "example" } ] }, "holiday_dates": [ "2026-04-15" ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”number_id
required
Number Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
AnsweringPolicySchedulePatchRequest
Compare-and-swap patch of only a policy’s business calendar.
The policy’s route tree is deliberately absent. A mobile calendar edit cannot race a web route-tree edit into a half-valid document because the request carries the version it read and the repository updates only when that exact version is still current.
object
expected_version
required
Expected Version
integer
business_hours
holiday_dates
Any of:
Array<string>
null
Examplegenerated
{ "expected_version": 1, "business_hours": { "additionalProperty": [ { "start": "example", "end": "example" } ] }, "holiday_dates": [ "2026-04-15" ]}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
AnsweringPolicySchedule
The independently editable calendar portion of an answering policy.
object
policy_id
required
Policy Id
string
phone_number_id
required
Phone Number Id
string
timezone
required
Timezone
string
business_hours
Business Hours
object
key
additional properties
Array<object>
CallingWindowOne local-time window on one weekday.
object
start
required
Start
string
end
required
End
string
holiday_dates
Holiday Dates
Array<string>
version
required
Version
integer
updated_at
required
Updated At
string format: date-time
Examplegenerated
{ "policy_id": "example", "phone_number_id": "example", "timezone": "example", "business_hours": { "additionalProperty": [ { "start": "example", "end": "example" } ] }, "holiday_dates": [ "2026-04-15" ], "version": 1, "updated_at": "2026-04-15T12:00:00Z"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}