public
POST /v1/public/chat/{publicKey}/conversations
A visitor says something for the first time.
प्रमाणन
यह एंडपॉइंट सार्वजनिक है। यह कोई क्रेडेंशियल और कोई संगठन नहीं लेता है—यह वही है जिसे हमारी अपनी मार्केटिंग साइट और AI उत्तर इंजन पढ़ते हैं।
यह एंडपॉइंट कोई संगठन आईडी नहीं लेता है। आपकी कुंजी पहले से ही उस संगठन की पहचान करती है जिससे वह संबंधित है, और प्रतिक्रिया उसी के दायरे में है।
इसे आज़माएँ
कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।
curl -X POST https://api.zinndigital.com/v1/public/chat/{publicKey}/conversations \
-H "Content-Type: application/json" \
-d '{ "message": <string> }'साइन इन हैं? आपके डैशबोर्ड में मौजूद API कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव API के विरुद्ध अनुरोध चलाता है ताकि आप वास्तविक प्रतिक्रिया देख सकें। इस एंडपॉइंट को API कंसोल में खोलें
विवरण
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.
पैरामीटर
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
publicKey (path) | string | हाँ | The 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… |
अनुरोध बॉडी
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
message | string | हाँ | — |
page_url | string | नहीं | — |
page_title | string | नहीं | — |
referrer | string | नहीं | — |
locale | string | नहीं | — |
name | string | नहीं | — |
email | string | नहीं | — |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
state | string<ai, waiting, open, offline, closed> | हाँ | — |
cursor | integer | हाँ | — |
poll_after_ms | integer | हाँ | How 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… |
messages | ChatMessage[] | हाँ | — |
conversation_id | string | हाँ | — |
visitor_token | string | हाँ | Returned 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… |
त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है
404 · 422 · 429