live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění livechat.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Tento koncový bod nevyžaduje žádné ID organizace. Váš klíč již identifikuje organizaci, ke které patří, a odpověď je na ni omezena.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
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.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
widgetId (path) | string | Ano | — |
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
name | string | Ne | — |
enabled | boolean | Ne | — |
allowed_origins | string[] | Ne | — |
greeting | string | Ne | — |
team_name | string | Ne | — |
accent_colour | string | Ne | — |
position | string<left, right> | Ne | — |
hide_branding | boolean | Ne | — |
ai_enabled | boolean | Ne | — |
offline_email | string | Ne | — |
business_hours | object | Ne | — |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | string | Ano | — |
site_id | string | Ano | — |
name | string | Ano | — |
public_key | string | Ano | — |
enabled | boolean | Ano | 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[] | Ano | 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 | Ano | — |
greeting | string | Ano | — |
team_name | string | Ano | — |
accent_colour | string | Ano | — |
position | string<left, right> | Ano | — |
hide_branding | boolean | Ano | — |
ai_enabled | boolean | Ano | — |
offline_email | string | Ano | — |
business_hours | object | Ne | — |
open_now | boolean | Ano | — |
ai_allowance | ChatAiAllowance | Ano | — |
limits | object | Ano | — |
premium_extra_code | string | Ano | The catalogue code to buy for the premium tier. |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 422