live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
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.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
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 PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'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`. 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.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
widgetId (path) | string | Oui | — |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
name | string | Non | — |
enabled | boolean | Non | — |
allowed_origins | string[] | Non | — |
greeting | string | Non | — |
team_name | string | Non | — |
accent_colour | string | Non | — |
position | string<left, right> | Non | — |
hide_branding | boolean | Non | — |
ai_enabled | boolean | Non | — |
offline_email | string | Non | — |
business_hours | object | 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 · 404 · 422