Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie livechat.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt verwacht org_id als een veld in de JSON-body.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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.
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
org_id | string | Nee | — |
site_id | string | Nee | — |
name | string | Ja | — |
team_name | string | Nee | — |
allowed_origins | string[] | Nee | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | string | Ja | — |
site_id | string | Ja | — |
name | string | Ja | — |
public_key | string | Ja | — |
enabled | boolean | Ja | 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[] | Ja | 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 | Ja | — |
greeting | string | Ja | — |
team_name | string | Ja | — |
accent_colour | string | Ja | — |
position | string<left, right> | Ja | — |
hide_branding | boolean | Ja | — |
ai_enabled | boolean | Ja | — |
offline_email | string | Ja | — |
business_hours | object | Nee | — |
open_now | boolean | Ja | — |
ai_allowance | ChatAiAllowance | Ja | — |
limits | object | Ja | — |
premium_extra_code | string | Ja | The catalogue code to buy for the premium tier. |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422