Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation livechat.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Où insérer l'ID de votre organisation
Cet endpoint prend org_id comme champ dans le corps JSON.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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.
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
org_id | string | Non | — |
site_id | string | Non | — |
name | string | Oui | — |
team_name | string | Non | — |
allowed_origins | string[] | Non | — |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | string | Oui | — |
site_id | string | Oui | — |
name | string | Oui | — |
public_key | string | Oui | — |
enabled | boolean | Oui | 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[] | Oui | 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 | Oui | — |
greeting | string | Oui | — |
team_name | string | Oui | — |
accent_colour | string | Oui | — |
position | string<left, right> | Oui | — |
hide_branding | boolean | Oui | — |
ai_enabled | boolean | Oui | — |
offline_email | string | Oui | — |
business_hours | object | Non | — |
open_now | boolean | Oui | — |
ai_allowance | ChatAiAllowance | Oui | — |
limits | object | Oui | — |
premium_extra_code | string | Oui | The catalogue code to buy for the premium tier. |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 422