public

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

A visitor says something for the first time.

Minden public végpont

Az összes fejlesztői dokumentáció

Hitelesítés

Ez a végpont nyilvános. Nem igényel hitelesítő adatot és szervezetet sem – ezt olvassa a saját marketingoldalunk és az MI-válaszadó motorunk is.

Ez a végpont nem fogad el szervezeti azonosítót. Az Ön kulcsa már azonosítja azt a szervezetet, amelyhez tartozik, és a válasz is erre vonatkozik.

Próbálja ki

Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.

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

Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban

Részletek

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.

Paraméterek

NévTípusKötelezőMi ez
publicKey (path)stringIgenThe 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…

Kérés törzse

NévTípusKötelezőMi ez
messagestringIgen
page_urlstringNem
page_titlestringNem
referrerstringNem
localestringNem
namestringNem
emailstringNem

Válasz

NévTípusKötelezőMi ez
statestring<ai, waiting, open, offline, closed>Igen
cursorintegerIgen
poll_after_msintegerIgenHow 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[]Igen
conversation_idstringIgen
visitor_tokenstringIgenReturned 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…

Hibák, amelyeket ez a végpont visszaadhattatlan

404 · 422 · 429