live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie livechat.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
widgetId (path) | string | Tak | — |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
name | string | Nie | — |
enabled | boolean | Nie | — |
allowed_origins | string[] | Nie | — |
greeting | string | Nie | — |
team_name | string | Nie | — |
accent_colour | string | Nie | — |
position | string<left, right> | Nie | — |
hide_branding | boolean | Nie | — |
ai_enabled | boolean | Nie | — |
offline_email | string | Nie | — |
business_hours | object | Nie | — |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | string | Tak | — |
site_id | string | Tak | — |
name | string | Tak | — |
public_key | string | Tak | — |
enabled | boolean | Tak | 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[] | Tak | 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 | Tak | — |
greeting | string | Tak | — |
team_name | string | Tak | — |
accent_colour | string | Tak | — |
position | string<left, right> | Tak | — |
hide_branding | boolean | Tak | — |
ai_enabled | boolean | Tak | — |
offline_email | string | Tak | — |
business_hours | object | Nie | — |
open_now | boolean | Tak | — |
ai_allowance | ChatAiAllowance | Tak | — |
limits | object | Tak | — |
premium_extra_code | string | Tak | The catalogue code to buy for the premium tier. |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422