public

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

A visitor says something for the first time.

सबै public इन्डपइन्टहरू

सबै विकासकर्ता कागजातहरू

प्रमाणीकरण

यो इन्डपइन्ट सार्वजनिक हो। यसले कुनै पनि प्रमाण पत्र र संस्था लिँदैन — यो हाम्रो आफ्नै मार्केटिङ साइट र 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…

अनुरोध बडी

नामप्रकारआवश्यकयो के हो
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[]हुन्छ
conversation_idstringहुन्छ
visitor_tokenstringहुन्छ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