live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung livechat.manage verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
Requires `livechat.manage`. Switching a widget on with no `allowedOrigins` is refused with `422` rather than accepted: the widget only answers pages on origins the customer listed, so an empty list would leave the chat live, looking configured, and invisible on every page with nothing saying why.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
widgetId (path) | string | Ja | — |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
name | string | Nein | — |
enabled | boolean | Nein | — |
allowed_origins | string[] | Nein | — |
greeting | string | Nein | — |
team_name | string | Nein | — |
accent_colour | string | Nein | — |
position | string<left, right> | Nein | — |
hide_branding | boolean | Nein | — |
ai_enabled | boolean | Nein | — |
offline_email | string | Nein | — |
business_hours | object | Nein | — |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
id | string | Ja | — |
site_id | string | Ja | — |
name | string | Ja | — |
public_key | string | Ja | — |
enabled | boolean | Ja | Whether the chat renders. Created FALSE always: the plugin ships in the deploy footprint of every WordPress site we host, so a widget may exist for a customer who never asked fo… |
allowed_origins | string[] | Ja | Origins the widget may be embedded on. An EMPTY list refuses every page rather than allowing any — this is the only control stopping somebody else's site opening conversations a… |
tier | string | Ja | — |
greeting | string | Ja | — |
team_name | string | Ja | — |
accent_colour | string | Ja | — |
position | string<left, right> | Ja | — |
hide_branding | boolean | Ja | — |
ai_enabled | boolean | Ja | — |
offline_email | string | Ja | — |
business_hours | object | Nein | — |
open_now | boolean | Ja | — |
ai_allowance | ChatAiAllowance | Ja | — |
limits | object | Ja | — |
premium_extra_code | string | Ja | The catalogue code to buy for the premium tier. |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 422