public

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

Anything said since the visitor's cursor.

सर्व public एंडपॉइंट्स

सर्व डेव्हलपर कागदपत्रे

प्रमाणीकरण

हा एंडपॉइंट सार्वजनिक आहे. याला कोणतीही क्रेडेन्शियल आणि कोणतेही ऑर्गनायझेशन लागत नाही — हे तेच आहे जे आमची स्वतःची मार्केटिंग साइट आणि AI आन्सर इंजिने वाचतात.

या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.

प्रयत्न करा

कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.

curl -X GET https://api.zinndigital.com/v1/public/chat/{publicKey}/conversations/{conversationId}/messages

साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

Anonymous, authorised by X-Zinn-Chat-Token. Returns immediately — empty if there is nothing — and tells the caller when to ask again in pollAfterMs. ⛔ This endpoint does not hold the connection open, and no future version of it should. The engine is WSGI with a small fixed number of concurrent request slots, so a long-poll or an SSE stream here would consume a share of the entire platform's capacity per open chat. When concurrency outgrows short-polling, chat moves to its own ASGI service — it does not become a socket on this one. ⭐ pollAfterMs is decided by the server, never by the widget. A cadence baked into a JavaScript file is cached on somebody else's site behind somebody else's CDN, so the one number governing fleet-wide load would be the one number we could not change.

पॅरामीटर्स

नावप्रकारआवश्यकहे काय आहे
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होय
after (query)integerनाहीThe highest seq the caller already has. A per-conversation counter, not a timestamp: two messages written in the same millisecond are indistinguishable by clock, so a time…

प्रतिसाद

नावप्रकारआवश्यकहे काय आहे
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 · 429