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
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
org_id | string | No | — |
site_id | string | No | — |
name | string | Sì | — |
team_name | string | No | — |
allowed_origins | string[] | No | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | string | Sì | — |
site_id | string | Sì | — |
name | string | Sì | — |
public_key | string | Sì | — |
enabled | boolean | Sì | 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[] | Sì | 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 | Sì | — |
greeting | string | Sì | — |
team_name | string | Sì | — |
accent_colour | string | Sì | — |
position | string<left, right> | Sì | — |
hide_branding | boolean | Sì | — |
ai_enabled | boolean | Sì | — |
offline_email | string | Sì | — |
business_hours | object | No | — |
open_now | boolean | Sì | — |
ai_allowance | ChatAiAllowance | Sì | — |
limits | object | Sì | — |
premium_extra_code | string | Sì | The catalogue code to buy for the premium tier. |
Errori che questo endpoint può restituire
401 · 403 · 422