Set who sees website chat
Choose who sees the website chat button installed with widget.js: everyone (the default), or preview, so the business can try the chat on its live site before its customers see it. With preview on, the button appears only on a page opened with ?vai_chat=1 on its address (for example https://example.com/?vai_chat=1), and then stays on in that browser tab as the visitor moves around the site, until the tab is closed. Set everyone to go live. Stored on the agent, not the draft: it applies on each visitor's next page load, with no publish. It hides the button, it isn't a lock: anyone who adds the parameter sees the chat, and the call pill (data-widget="voice") is not affected. Needs website chat switched on (set_channel) and the line on the site. get_agent shows the current value as settings.widgetVisibility (absent means everyone).
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/set_widget_visibility" \ -H "Content-Type: application/json" \ -d '{ "visibility": "everyone", "agent": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Set widget theme POST
Theme the agent's website chat widget (the launcher bubble and chat panel installed with widget.js). Fields: `accent` (hex; launcher, send button, the visitor's own bubbles), `surface` (hex; panel background), `text` (hex; main text colour), `radius` (px 0-24), `font` (system | helvetica | verdana | trebuchet | rounded | georgia | times | palatino | mono; system fonts only), `mode` (light | dark | auto, where auto follows the visitor's light/dark preference), `teaser` (optional line shown once per visitor in a bubble beside the launcher, max 120 characters; off by default), `greeting` (the chat's opening message, max 300 characters; set it when the agent's own greeting is written for the phone, such as 'Thanks for calling'; null falls back to the agent's greeting), `welcomePrompts` (up to 4 tappable starters under the greeting, each max 60 characters, e.g. ['Prices', 'Opening hours']; a tap sends that text as the visitor's first message; replaces the list, [] removes them), `nudges` (up to 8 follow-up questions, each max 120 characters; while the panel is open and the visitor is quiet, the next one appears as the agent's message every `nudgeDelaySeconds`, in order, each once per conversation, stopping when staff reply or the list runs out; replaces the list, [] turns them off), `nudgeDelaySeconds` (5-120, default 10). Send only what changes; each field merges. null (or an empty teaser or greeting) resets that field to the default. Stored on the agent, not the draft: the live widget picks it up on its next page load, no publish needed. An installer's `data-accent` on the snippet still overrides the accent. The header name and avatar come from set_branding (displayName) and the uploaded logo, not from here.
Turn workflow function off or on POST
Turn one workflow function off or back on, by slot and name, without changing anything else about it. An off function never runs and records skipped on every call, and every function that waits on it, directly or through others, is skipped too; the result names those functions. Works on a draft, or on a published latest version when you pass draftFrom.