live-chat

PATCH /v1/chat/widgets/{widgetId}

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

Tutti gli endpoint live-chat

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione livechat.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

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

NomeTipoObbligatorioChe cos'è
widgetId (path)string

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
namestringNo
enabledbooleanNo
allowed_originsstring[]No
greetingstringNo
team_namestringNo
accent_colourstringNo
positionstring<left, right>No
hide_brandingbooleanNo
ai_enabledbooleanNo
offline_emailstringNo
business_hoursobjectNo

Risposta

NomeTipoObbligatorioChe cos'è
idstring
site_idstring
namestring
public_keystring
enabledbooleanWhether 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[]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…
tierstring
greetingstring
team_namestring
accent_colourstring
positionstring<left, right>
hide_brandingboolean
ai_enabledboolean
offline_emailstring
business_hoursobjectNo
open_nowboolean
ai_allowanceChatAiAllowance
limitsobject
premium_extra_codestringThe catalogue code to buy for the premium tier.

Errori che questo endpoint può restituire

401 · 403 · 404 · 422