live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea livechat.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
widgetId (path) | string | Da | — |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
name | string | Nu | — |
enabled | boolean | Nu | — |
allowed_origins | string[] | Nu | — |
greeting | string | Nu | — |
team_name | string | Nu | — |
accent_colour | string | Nu | — |
position | string<left, right> | Nu | — |
hide_branding | boolean | Nu | — |
ai_enabled | boolean | Nu | — |
offline_email | string | Nu | — |
business_hours | object | Nu | — |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | string | Da | — |
site_id | string | Da | — |
name | string | Da | — |
public_key | string | Da | — |
enabled | boolean | Da | 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[] | Da | 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 | Da | — |
greeting | string | Da | — |
team_name | string | Da | — |
accent_colour | string | Da | — |
position | string<left, right> | Da | — |
hide_branding | boolean | Da | — |
ai_enabled | boolean | Da | — |
offline_email | string | Da | — |
business_hours | object | Nu | — |
open_now | boolean | Da | — |
ai_allowance | ChatAiAllowance | Da | — |
limits | object | Da | — |
premium_extra_code | string | Da | The catalogue code to buy for the premium tier. |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 422