public

POST /v1/public/chat/{publicKey}/conversations

A visitor says something for the first time.

Tất cả các điểm cuối public

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

Xác thực

Điểm cuối này là công khai. Nó không yêu cầu thông tin xác thực hay tổ chức nào — đây chính là nội dung mà trang web tiếp thị và các công cụ trả lời bằng AI của chúng tôi đọc.

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 POST https://api.zinndigital.com/v1/public/chat/{publicKey}/conversations \
  -H "Content-Type: application/json" \
  -d '{ "message": <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

Anonymous. Opens a conversation and writes the visitor's first message, then lets the assistant answer it inline if the customer has AI switched on. The response carries a visitorToken once and never again. It is a bearer secret — the only thing standing between one visitor and another's transcript on the same site — so the widget keeps it in the visitor's own storage and presents it in X-Zinn-Chat-Token on every subsequent call. It is never accepted in a query string, because a query string is written to every access log.

Tham số

TênLoạiBắt buộcNội dung này là gì
publicKey (path)stringThe widget's public key. Public by design — it ships in the page source of every site that embeds the widget — so it NAMES a widget and authorises nothing; the Origin header is…

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
messagestring
page_urlstringKhông
page_titlestringKhông
referrerstringKhông
localestringKhông
namestringKhông
emailstringKhông

Phản hồi

TênLoạiBắt buộcNội dung này là gì
statestring<ai, waiting, open, offline, closed>
cursorinteger
poll_after_msintegerHow long the widget should wait before asking again. Decided by the SERVER on every response, because a cadence baked into the widget is cached on somebody else's site behind…
messagesChatMessage[]
conversation_idstring
visitor_tokenstringReturned ONCE and never again. A bearer secret — the only thing between one visitor and another's transcript on the same site — presented afterwards in X-Zinn-Chat-Token, never…

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

404 · 422 · 429