live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Doğrulama
API açarını bearer token kimi göndərin. Açar livechat.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
widgetId (path) | string | Bəli | — |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
name | string | Xeyr | — |
enabled | boolean | Xeyr | — |
allowed_origins | string[] | Xeyr | — |
greeting | string | Xeyr | — |
team_name | string | Xeyr | — |
accent_colour | string | Xeyr | — |
position | string<left, right> | Xeyr | — |
hide_branding | boolean | Xeyr | — |
ai_enabled | boolean | Xeyr | — |
offline_email | string | Xeyr | — |
business_hours | object | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | string | Bəli | — |
site_id | string | Bəli | — |
name | string | Bəli | — |
public_key | string | Bəli | — |
enabled | boolean | Bəli | 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[] | Bəli | 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 | Bəli | — |
greeting | string | Bəli | — |
team_name | string | Bəli | — |
accent_colour | string | Bəli | — |
position | string<left, right> | Bəli | — |
hide_branding | boolean | Bəli | — |
ai_enabled | boolean | Bəli | — |
offline_email | string | Bəli | — |
business_hours | object | Xeyr | — |
open_now | boolean | Bəli | — |
ai_allowance | ChatAiAllowance | Bəli | — |
limits | object | Bəli | — |
premium_extra_code | string | Bəli | The catalogue code to buy for the premium tier. |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 422