live-chat

PATCH /v1/chat/widgets/{widgetId}

Change a chat's settings, or switch it on.

Bütün live-chat nöqtələri

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

AdTipTələb olunurNədir
widgetId (path)stringBəli

Sorğu gövdəsi

AdTipTələb olunurNədir
namestringXeyr
enabledbooleanXeyr
allowed_originsstring[]Xeyr
greetingstringXeyr
team_namestringXeyr
accent_colourstringXeyr
positionstring<left, right>Xeyr
hide_brandingbooleanXeyr
ai_enabledbooleanXeyr
offline_emailstringXeyr
business_hoursobjectXeyr

Cavab

AdTipTələb olunurNədir
idstringBəli
site_idstringBəli
namestringBəli
public_keystringBəli
enabledbooleanBəliWhether 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_originsstring[]BəliOrigins 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…
tierstringBəli
greetingstringBəli
team_namestringBəli
accent_colourstringBəli
positionstring<left, right>Bəli
hide_brandingbooleanBəli
ai_enabledbooleanBəli
offline_emailstringBəli
business_hoursobjectXeyr
open_nowbooleanBəli
ai_allowanceChatAiAllowanceBəli
limitsobjectBəli
premium_extra_codestringBəliThe catalogue code to buy for the premium tier.

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 404 · 422