live-chat
POST /v1/chat/widgets
Create a chat for a site.
توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس livechat.manage اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
جہاں آپ کی تنظیم کی آئی ڈی آتی ہے
یہ اینڈ پوائنٹ JSON باڈی میں ایک فیلڈ کے طور پر org_id لیتا ہے۔
آپ کی تنظیم کی آئی ڈی آپ کے ڈیش بورڈ پر 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_id | string | نہیں | — |
site_id | string | نہیں | — |
name | string | ہاں | — |
team_name | string | نہیں | — |
allowed_origins | string[] | نہیں | — |
جواب
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
id | string | ہاں | — |
site_id | string | ہاں | — |
name | string | ہاں | — |
public_key | string | ہاں | — |
enabled | boolean | ہاں | 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[] | ہاں | 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 | ہاں | 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> | ہاں | 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 | ہاں | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | ہاں | — |
team_name | string | ہاں | — |
accent_colour | string | ہاں | — |
position | string<left, right> | ہاں | — |
hide_branding | boolean | ہاں | — |
ai_enabled | boolean | ہاں | — |
offline_email | string | ہاں | — |
business_hours | object | نہیں | — |
open_now | boolean | ہاں | — |
ai_allowance | ChatAiAllowance | ہاں | — |
limits | object | ہاں | — |
premium_extra_code | string | ہاں | The catalogue code to buy for the premium tier. |
وہ خرابیان جو یہ اینڈ پوائنٹ واپس کر سکتا ہے
401 · 403 · 422