Put Webchat Human Availability
PUT /webchat/human-availability
Set the office hours that decide whether a visitor is offered a person.
enabled: true with no reachable interval is worse than off: the widget
offers a handover nobody answers. The app refuses the unreachable shapes
and this forwards its answer rather than inventing a second opinion.
Overlapping and zero-length windows are refused at THIS boundary, because the request model is the app’s own.
Authorizations
Parameters
Header Parameters
Request Body required
When a human is available to take a handed-off conversation.
THIS IS WHAT DECIDES WHETHER A VISITOR IS OFFERED A PERSON. Turning it on with no reachable interval is worse than leaving it off: the widget offers a handover nobody answers. The app refuses the unreachable shapes; this forwards its answer.
intervals and overrides use the app’s own window models, which reject a
zero-length window and refuse overlapping ones - see the module docstring.
object
Weekly windows: {day: 0-6, start: 'HH:MM', end: 'HH:MM'}.
A weekly recurring window. day is 0-6 with Monday = 0.
object
Date overrides: {date: 'YYYY-MM-DD', intervals: [...]}.
A single calendar date whose windows REPLACE that weekday’s windows.
An empty intervals list means closed all day — that is the whole point of an
override, so it is not treated as “unset”. Window day values are ignored
here (the date already fixes the day), and a client that sends one has it
dropped by Pydantic’s default extra="ignore".
object
One open window inside a single day, as wall-clock HH:MM.
end <= start means the window crosses midnight into the next day; "24:00"
is a legal end only and means end-of-day.
Both fields pin an exact LENGTH as well as a pattern, because a container’s
max_length bounds the element COUNT and never a nested string — the bound on
the string itself has to live here.
The length pin is redundant against today’s engine and kept anyway: pydantic
compiles this pattern with the Rust regex crate, whose $ matches only at the
end of the haystack, so “09:00\n” is already rejected. Python’s re, which
pydantic falls back to for patterns the Rust engine cannot compile, matches $
BEFORE a trailing newline and would let it through. Five characters cannot hold
a newline either way, so the pin makes the guarantee engine-independent.
object
IANA zone the intervals are expressed in.
Responses
200
Successful Response
object
An open envelope for one webchat object.
Open because the widget’s config grows a field per product decision and a pinned schema would DROP it. Same choice the desk surface made.
object
object
Whether there are more pages
Items per page
Current page number (1-indexed)
Total number of items
422
Validation Error