live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
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
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
widgetId (path) | string | Ja | — |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
name | string | Nee | — |
enabled | boolean | Nee | — |
allowed_origins | string[] | Nee | — |
greeting | string | Nee | — |
team_name | string | Nee | — |
accent_colour | string | Nee | — |
position | string<left, right> | Nee | — |
hide_branding | boolean | Nee | — |
ai_enabled | boolean | Nee | — |
offline_email | string | Nee | — |
business_hours | object | Nee | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | string | Ja | — |
site_id | string | Ja | — |
name | string | Ja | — |
public_key | string | Ja | — |
enabled | boolean | Ja | 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[] | Ja | 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 | Ja | — |
greeting | string | Ja | — |
team_name | string | Ja | — |
accent_colour | string | Ja | — |
position | string<left, right> | Ja | — |
hide_branding | boolean | Ja | — |
ai_enabled | boolean | Ja | — |
offline_email | string | Ja | — |
business_hours | object | Nee | — |
open_now | boolean | Ja | — |
ai_allowance | ChatAiAllowance | Ja | — |
limits | object | Ja | — |
premium_extra_code | string | Ja | The catalogue code to buy for the premium tier. |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 422