Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso livechat.manage; una clave que no lo tenga se rechazará con un código 403, no 404.
Donde va el ID de tu organización
Este endpoint toma org_id como un campo en el cuerpo JSON.
El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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.
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
org_id | string | No | — |
site_id | string | No | — |
name | string | Sí | — |
team_name | string | No | — |
allowed_origins | string[] | No | — |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
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. |
Errores que este endpoint puede devolver
401 · 403 · 422