Write the business hours and wait queue
PUT/api/channels/:channel/calls/switchboard
Sections are independent — a payload carrying only queue leaves the
calendar alone — but each section is written WHOLESALE, because a
schedule is a single artefact and merging a partial week onto a stored
one is how a tenant ends up with Tuesday twice.
Saving the calendar also synthesizes the out-of-hours greeting (so the
next 3 a.m. call is greeted rather than declined) and, when the tenant
asked for it, mirrors the schedule to Meta. The mirror is best-effort BY
CONTRACT: its outcome is reported in meta_mirror, and a Graph refusal
never fails the save. Admin-gated (Channel update).
Request
Responses
- 200
- 422
Saved, with the outcome of the optional Meta mirror.
A malformed schedule, a language outside the catalogue, a voice menu this deployment cannot honour (ivr_unsupported — the bridge cannot speak into an unanswered call; ivr_no_options — a menu with no keys), a welcome the same bridge cannot speak (welcome_unsupported) or one that would sit on top of a menu (welcome_conflicts_with_ivr — the menu's prompt IS the greeting, so the pair is refused in both directions), a callback offer this channel cannot make (callback_offer_unsupported — it needs a sentence out AND a keypress back), or a setting this KIND of line cannot keep: voicemail_unsupported (a decline only becomes a voicemail on a WhatsApp number — elsewhere it is a hang-up) and no_written_thread (send_message on a voice-only line, which has no chat channel for the message to arrive on). Both are refused at save time rather than degraded silently at three in the morning.