live-chat

PATCH /v1/chat/widgets/{widgetId}

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

Tất cả các điểm cuối live-chat

Tất cả tài liệu dành cho nhà phát triển

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.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

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 PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Đã đă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. 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.

Tham số

TênLoạiBắt buộcNội dung này là gì
widgetId (path)string

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
namestringKhông
enabledbooleanKhông
allowed_originsstring[]Không
greetingstringKhông
team_namestringKhông
accent_colourstringKhông
positionstring<left, right>Không
hide_brandingbooleanKhông
ai_enabledbooleanKhông
offline_emailstringKhông
business_hoursobjectKhô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 · 404 · 422