live-chat

PATCH /v1/chat/widgets/{widgetId}

Change a chat's settings, or switch it on.

Wszystkie punkty końcowe live-chat

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

NazwaTypWymaganeCo to jest
widgetId (path)stringTak

Treść żądania

NazwaTypWymaganeCo to jest
namestringNie
enabledbooleanNie
allowed_originsstring[]Nie
greetingstringNie
team_namestringNie
accent_colourstringNie
positionstring<left, right>Nie
hide_brandingbooleanNie
ai_enabledbooleanNie
offline_emailstringNie
business_hoursobjectNie

Odpowiedź

NazwaTypWymaganeCo to jest
idstringTak
site_idstringTak
namestringTak
public_keystringTak
enabledbooleanTakWhether 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_originsstring[]TakOrigins 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…
tierstringTak
greetingstringTak
team_namestringTak
accent_colourstringTak
positionstring<left, right>Tak
hide_brandingbooleanTak
ai_enabledbooleanTak
offline_emailstringTak
business_hoursobjectNie
open_nowbooleanTak
ai_allowanceChatAiAllowanceTak
limitsobjectTak
premium_extra_codestringTakThe catalogue code to buy for the premium tier.

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 422