live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу livechat.manage; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
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.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
widgetId (path) | string | Да | — |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
name | string | Не | — |
enabled | boolean | Не | — |
allowed_origins | string[] | Не | — |
greeting | string | Не | — |
team_name | string | Не | — |
accent_colour | string | Не | — |
position | string<left, right> | Не | — |
hide_branding | boolean | Не | — |
ai_enabled | boolean | Не | — |
offline_email | string | Не | — |
business_hours | object | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | string | Да | — |
site_id | string | Да | — |
name | string | Да | — |
public_key | string | Да | — |
enabled | boolean | Да | 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 for… |
allowed_origins | string[] | Да | 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… |
tier | string | Да | The tier this widget is on. Since 2026-09-29 hosting includes no Premium, so this is the tier that was bought (the same value as purchased_tier). |
tier_source | string<free, purchase> | Да | Why the widget is on that tier: purchase means the Premium extra was bought for this site, free means it was not. (hosting was retired on 2026-09-29 with the hosting… |
purchased_tier | string | Да | The tier actually PAID for. |
greeting | string | Да | — |
team_name | string | Да | — |
accent_colour | string | Да | — |
position | string<left, right> | Да | — |
hide_branding | boolean | Да | — |
logo_url | string | Да | The uploaded logo, or empty. Shown here whatever the tier so the customer sees what is stored; visitors are served it only on Premium. |
ai_enabled | boolean | Да | — |
offline_email | string | Да | — |
business_hours | object | Не | — |
open_now | boolean | Да | Whether the chat currently reads as open. Opening hours are a Premium setting, so a free chat is always open whatever hours it has stored. |
ai_allowance | ChatAiAllowance | Да | — |
limits | object | Да | — |
premium_extra_code | string | Да | The catalogue code to buy for the premium tier. |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 422