public

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

The visitor says something else.

सभी public एंडपॉइंट्स

सभी डेवलपर दस्तावेज़

प्रमाणन

यह एंडपॉइंट सार्वजनिक है। यह कोई क्रेडेंशियल और कोई संगठन नहीं लेता है—यह वही है जिसे हमारी अपनी मार्केटिंग साइट और AI उत्तर इंजन पढ़ते हैं।

यह एंडपॉइंट कोई संगठन आईडी नहीं लेता है। आपकी कुंजी पहले से ही उस संगठन की पहचान करती है जिससे वह संबंधित है, और प्रतिक्रिया उसी के दायरे में है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

curl -X POST https://api.zinndigital.com/v1/public/chat/{publicKey}/conversations/{conversationId}/messages \
  -H "Content-Type: application/json" \
  -d '{ "message": <string> }'

साइन इन हैं? आपके डैशबोर्ड में मौजूद API कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव API के विरुद्ध अनुरोध चलाता है ताकि आप वास्तविक प्रतिक्रिया देख सकें। इस एंडपॉइंट को API कंसोल में खोलें

विवरण

Anonymous, authorised by X-Zinn-Chat-Token. The message is written to the database in this request, before any operator or assistant is involved — so nothing is lost when a consumer is down. A visitor writing into a conversation the operator had closed reopens it rather than being told it is over.

पैरामीटर

नामप्रकारआवश्यकयह क्या है
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…
conversationId (path)stringहाँ

अनुरोध बॉडी

नामप्रकारआवश्यकयह क्या है
messagestringहाँ
page_urlstringनहीं
page_titlestringनहीं
referrerstringनहीं
localestringनहीं
namestringनहीं
emailstringनहीं

प्रतिक्रिया

नामप्रकारआवश्यकयह क्या है
statestring<ai, waiting, open, offline, closed>हाँ
cursorintegerहाँ
poll_after_msintegerहाँ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…
messagesChatMessage[]हाँ

त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है

404 · 422 · 429