live-chat

PATCH /v1/chat/widgets/{widgetId}

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

Alle live-chat Endpunkte

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

NameTypErforderlichWas es ist
widgetId (path)stringJa

Anfragekörper

NameTypErforderlichWas es ist
namestringNein
enabledbooleanNein
allowed_originsstring[]Nein
greetingstringNein
team_namestringNein
accent_colourstringNein
positionstring<left, right>Nein
hide_brandingbooleanNein
ai_enabledbooleanNein
offline_emailstringNein
business_hoursobjectNein

Antwort

NameTypErforderlichWas es ist
idstringJa
site_idstringJa
namestringJa
public_keystringJa
enabledbooleanJaWhether 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[]JaOrigins 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…
tierstringJa
greetingstringJa
team_namestringJa
accent_colourstringJa
positionstring<left, right>Ja
hide_brandingbooleanJa
ai_enabledbooleanJa
offline_emailstringJa
business_hoursobjectNein
open_nowbooleanJa
ai_allowanceChatAiAllowanceJa
limitsobjectJa
premium_extra_codestringJaThe catalogue code to buy for the premium tier.

Fehler, die dieser Endpunkt zurückgeben kann

401 · 403 · 404 · 422