Operations
Operations

Set widget theme

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), `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) 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.

POST
/operations/set_widget_theme

Authorization

bearerAuth
AuthorizationBearer <token>

A personal access token from Settings > API tokens.

In: header

Header Parameters

Idempotency-Key?string

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.

Length1 <= length <= 255

Request 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_theme" \  -H "Content-Type: application/json" \  -d '{    "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
}