احراز هویت

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

جایی که شناسه سازمان شما قرار می‌گیرد

این نقطه پایانی org_id را به عنوان یک فیلد در بدنه JSON دریافت می‌کند.

شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواست‌هایی که ارسال می‌کنید یکسان است.

امتحان کنید

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

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

وارد شده‌اید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی API زنده اجرا می‌کند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید

جزئیات

Requires livechat.manage. The new widget is created switched off: a chat window that starts talking to a customer's visitors before they have asked for one is a consent problem, not a feature.

بدنه درخواست

نامنوعالزامیچیست
org_idstringخیر
site_idstringخیر
namestringبله
team_namestringخیر
allowed_originsstring[]خیر

پاسخ

نامنوعالزامیچیست
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 · 422