live-chat

POST /v1/chat/widgets

Create a chat for a site.

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.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come campo nel corpo JSON.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

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

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

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`. The new widget is created **switched off**: a chat window that starts talking to a customer's visitors before they have asked for one is a consent problem, not a feature.

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
org_idstringNo
site_idstringNo
namestring
team_namestringNo
allowed_originsstring[]No

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 · 422