public

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

A visitor says something for the first time.

Tüm public uç noktaları

Tüm geliştirici belgeleri

Kimlik Doğrulama

Bu uç nokta arakatmana açıktır. Kimlik bilgisi ve organizasyon gerektirmez; kendi pazarlama sitemizin ve yapay zeka yanıt motorlarımızın okuduğu yerdir.

Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.

Dene

Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.

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

Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın

Ayrıntılar

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.

Parametreler

AdTürZorunluNe olduğu
publicKey (path)stringEvetThe 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…

İstek gövdesi

AdTürZorunluNe olduğu
messagestringEvet
page_urlstringHayır
page_titlestringHayır
referrerstringHayır
localestringHayır
namestringHayır
emailstringHayır

Yanıt

AdTürZorunluNe olduğu
statestring<ai, waiting, open, offline, closed>Evet
cursorintegerEvet
poll_after_msintegerEvetHow 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[]Evet
conversation_idstringEvet
visitor_tokenstringEvetReturned 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…

Bu uç noktanın dönderebileceği hatalar

404 · 422 · 429