live-chat

PATCH /v1/chat/widgets/{widgetId}

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

Alle live-chat-eindpunten

Authenticatie

Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie livechat.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.

Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.

Probeer het

Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.

curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console

Details

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.

Parameters

NaamTypeVerplichtWat dit is
widgetId (path)stringJa

Aanvraaglichaam

NaamTypeVerplichtWat dit is
namestringNee
enabledbooleanNee
allowed_originsstring[]Nee
greetingstringNee
team_namestringNee
accent_colourstringNee
positionstring<left, right>Nee
hide_brandingbooleanNee
ai_enabledbooleanNee
offline_emailstringNee
business_hoursobjectNee

Reactie

NaamTypeVerplichtWat dit is
idstringJa
site_idstringJa
namestringJa
public_keystringJa
enabledbooleanJaWhether 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[]JaOrigins 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…
tierstringJa
greetingstringJa
team_namestringJa
accent_colourstringJa
positionstring<left, right>Ja
hide_brandingbooleanJa
ai_enabledbooleanJa
offline_emailstringJa
business_hoursobjectNee
open_nowbooleanJa
ai_allowanceChatAiAllowanceJa
limitsobjectJa
premium_extra_codestringJaThe catalogue code to buy for the premium tier.

Fouten die dit eindpunt kan retourneren

401 · 403 · 404 · 422