live-chat

PATCH /v1/chat/widgets/{widgetId}

Change a chat's settings, or switch it on.

Todos os endpoints de live-chat

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.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

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 PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

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`. 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.

Parâmetros

NomeTipoObrigatórioO que é
widgetId (path)stringSim

Corpo da requisição

NomeTipoObrigatórioO que é
namestringNão
enabledbooleanNão
allowed_originsstring[]Não
greetingstringNão
team_namestringNão
accent_colourstringNão
positionstring<left, right>Não
hide_brandingbooleanNão
ai_enabledbooleanNão
offline_emailstringNão
business_hoursobjectNão

Resposta

NomeTipoObrigatórioO que é
idstringSim
site_idstringSim
namestringSim
public_keystringSim
enabledbooleanSimWhether 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_originsstring[]SimOrigins 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…
tierstringSim
greetingstringSim
team_namestringSim
accent_colourstringSim
positionstring<left, right>Sim
hide_brandingbooleanSim
ai_enabledbooleanSim
offline_emailstringSim
business_hoursobjectNão
open_nowbooleanSim
ai_allowanceChatAiAllowanceSim
limitsobjectSim
premium_extra_codestringSimThe catalogue code to buy for the premium tier.

Erros que este endpoint pode retornar

401 · 403 · 404 · 422