Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão livechat.manage; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como um campo no corpo JSON.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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 da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id | string | Não | — |
site_id | string | Não | — |
name | string | Sim | — |
team_name | string | Não | — |
allowed_origins | string[] | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Sim | — |
site_id | string | Sim | — |
name | string | Sim | — |
public_key | string | Sim | — |
enabled | boolean | Sim | 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[] | Sim | 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 | Sim | — |
greeting | string | Sim | — |
team_name | string | Sim | — |
accent_colour | string | Sim | — |
position | string<left, right> | Sim | — |
hide_branding | boolean | Sim | — |
ai_enabled | boolean | Sim | — |
offline_email | string | Sim | — |
business_hours | object | Não | — |
open_now | boolean | Sim | — |
ai_allowance | ChatAiAllowance | Sim | — |
limits | object | Sim | — |
premium_extra_code | string | Sim | The catalogue code to buy for the premium tier. |
Erros que este endpoint pode retornar
401 · 403 · 422