live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Санҷиши ҳаққоният
Kaliti API-ро ҳамчун рамзи доранда (bearer token) фиристед. Калит бояд дорои иҷозати livechat.manage бошад; калиди бидуни он бо хатои 403 рад карда мешавад, на 404.
Ин нуқтаи поёнӣ ягон рақами мушаххаси созмонро талаб намекунад. Калиди шумо аллакай созмонеро, ки ба он тааллуқ дорад, муайян мекунад ва ҷавоб ба он маҳдуд карда мешавад.
Санҷидан
Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Воarid шудаед? Консоли API дар панели идоракунии шумо рақами мушаххаси ташкилоти воқеӣ ва калиди худро пур мекунад ва дархостро бар зидди 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 EFFECTIVELY on. Premium is included free with Zinn® hosting, so this may read premium on a widget nobody has paid for — read purchased_tier for what… |
tier_source | string<free, purchase, hosting> | Бале | Why the widget is on that tier. hosting means it is included with the customer's Zinn® hosting and there is nothing to buy; purchase means the Premium extra was bought for… |
purchased_tier | string | Бале | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | Бале | — |
team_name | string | Бале | — |
accent_colour | string | Бале | — |
position | string<left, right> | Бале | — |
hide_branding | boolean | Бале | — |
ai_enabled | boolean | Бале | — |
offline_email | string | Бале | — |
business_hours | object | Не | — |
open_now | boolean | Бале | — |
ai_allowance | ChatAiAllowance | Бале | — |
limits | object | Бале | — |
premium_extra_code | string | Бале | The catalogue code to buy for the premium tier. |
Хатоҳое, ки ин нуқтаи ниҳоӣ метавонад баргардонад
401 · 403 · 404 · 422