public

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

A visitor says something for the first time.

සියලුම public අන්ත ලක්ෂ්‍ය

සියලුම සංවර්ධක ලේඛන

සත්‍යාපනය

මෙම අවසාන ලක්ෂ්‍යය ප්‍රසිද්ධය. එය කිසිදු අක්පත්‍රයක් සහ සංවිධානයක් නොගනී — එය අපගේම අලෙවිකරණ අඩවිය සහ AI පිළිතුරු එන්ජින් කියවන දෙයකි.

මෙම අවසාන ලක්ෂ්‍යය සඳහා සංවිධාන හැඳුනුම්පතක් (organisation id) අවශ්‍ය නොවේ. ඔබගේ යතුර මඟින් එය අයත් වන සංවිධානය දැනටමත් හඳුනා ගන්නා අතර, ප්‍රතිචාරය ඒ වෙත සීමා වේ.

උත්සාහ කරන්න

<අගයන්> සමඟ කෝණික වරහන් තුළ ඇති ඕනෑම දෙයක් සහ ඔබේ උපකරණ පුවරුවෙන් ලබාගත් යතුරක් සමඟ key ස්ථාන දායකය ප්‍රතිස්ථාපනය කරන්න.

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නැත

පsspil

නමවර්ගයඅත්‍යවශ්‍යයිඑය කුමක්ද
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