public
POST /v1/public/chat/{publicKey}/conversations
A visitor says something for the first time.
Tabbatar da Asali
Wannan yankin ƙarshen jama'a ne. Ba ya ɗaukar wata takardar shaida ko ƙungiya — shi ne abin da shafin kasuwancinmu da injunan amsa na AI ke karantawa.
Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
curl -X POST https://api.zinndigital.com/v1/public/chat/{publicKey}/conversations \
-H "Content-Type: application/json" \
-d '{ "message": <string> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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.
Sigogi
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
publicKey (path) | string | Eh | 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… |
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
message | string | Eh | — |
page_url | string | A'a | — |
page_title | string | A'a | — |
referrer | string | A'a | — |
locale | string | A'a | — |
name | string | A'a | — |
email | string | A'a | — |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
state | string<ai, waiting, open, offline, closed> | Eh | — |
cursor | integer | Eh | — |
poll_after_ms | integer | Eh | 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… |
messages | ChatMessage[] | Eh | — |
conversation_id | string | Eh | — |
visitor_token | string | Eh | 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… |
Kuskuren da wannan matsaya za ta iya maido wa
404 · 422 · 429