live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar livechat.manage iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
widgetId (path) | string | Evet | — |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
name | string | Hayır | — |
enabled | boolean | Hayır | — |
allowed_origins | string[] | Hayır | — |
greeting | string | Hayır | — |
team_name | string | Hayır | — |
accent_colour | string | Hayır | — |
position | string<left, right> | Hayır | — |
hide_branding | boolean | Hayır | — |
ai_enabled | boolean | Hayır | — |
offline_email | string | Hayır | — |
business_hours | object | Hayır | — |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | string | Evet | — |
site_id | string | Evet | — |
name | string | Evet | — |
public_key | string | Evet | — |
enabled | boolean | Evet | 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[] | Evet | 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 | Evet | 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> | Evet | 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 | Evet | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | Evet | — |
team_name | string | Evet | — |
accent_colour | string | Evet | — |
position | string<left, right> | Evet | — |
hide_branding | boolean | Evet | — |
ai_enabled | boolean | Evet | — |
offline_email | string | Evet | — |
business_hours | object | Hayır | — |
open_now | boolean | Evet | — |
ai_allowance | ChatAiAllowance | Evet | — |
limits | object | Evet | — |
premium_extra_code | string | Evet | The catalogue code to buy for the premium tier. |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 422