Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền livechat.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
org_idstringKhông
site_idstringKhông
namestring
team_namestringKhông
allowed_originsstring[]Không

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
site_idstring
namestring
public_keystring
enabledbooleanWhether 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…
tierstringThe 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_tierstringThe tier actually PAID for, independent of any hosting inclusion.
greetingstring
team_namestring
accent_colourstring
positionstring<left, right>
hide_brandingboolean
ai_enabledboolean
offline_emailstring
business_hoursobjectKhông
open_nowboolean
ai_allowanceChatAiAllowance
limitsobject
premium_extra_codestringThe catalogue code to buy for the premium tier.

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422