live-chat

PATCH /v1/chat/widgets/{widgetId}

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

همه نقاط پایانی live-chat

همهٔ مستندات توسعه‌دهندگان

احراز هویت

یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز livechat.manage باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد می‌شود، نه 404.

این نقطه پایانی هیچ شناسه سازمانی را دریافت نمی‌کند. کلید شما در حال حاضر سازمان مربوطه را مشخص می‌کند و پاسخ در همان محدوده ارائه می‌شود.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

وارد شده‌اید؟ کنسول 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بله

بدنه درخواست

نامنوعالزامیچیست
namestringخیر
enabledbooleanخیر
allowed_originsstring[]خیر
greetingstringخیر
team_namestringخیر
accent_colourstringخیر
positionstring<left, right>خیر
hide_brandingbooleanخیر
ai_enabledbooleanخیر
offline_emailstringخیر
business_hoursobjectخیر

پاسخ

نامنوعالزامیچیست
idstringبله
site_idstringبله
namestringبله
public_keystringبله
enabledbooleanبله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_originsstring[]بله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…
tierstringبله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_sourcestring<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_tierstringبلهThe tier actually PAID for, independent of any hosting inclusion.
greetingstringبله
team_namestringبله
accent_colourstringبله
positionstring<left, right>بله
hide_brandingbooleanبله
ai_enabledbooleanبله
offline_emailstringبله
business_hoursobjectخیر
open_nowbooleanبله
ai_allowanceChatAiAllowanceبله
limitsobjectبله
premium_extra_codestringبلهThe catalogue code to buy for the premium tier.

خطاهایی که این نقطه پایانی می‌تواند برگرداند

401 · 403 · 404 · 422