public

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

A visitor says something for the first time.

ټول public پای ټکي

ټول د پراختیا کونکي اسناد

تصدیق‌هویت

دا پای ټکی عامه دی. دا هېڅ اعتبار او هېڅ سازمان ته اړتیا نه لري - دا هغه څه دي چې زموږ خپله د بازار موندنې پاڼه او د مصنوعي ځيرکتیا د ځواب انجنونه یې لولي.

دا پای نقطه د سازمان هېڅ آی ډي نه اخلي. ستاسو کیلي مخکې تر مخکې هغه سازمان په ګوته کوي چې پورې اړه لري، او ځواب ورته محدود دی.

هڅه وکړئ

د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.

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

ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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