public
POST /v1/public/chat/{publicKey}/conversations
A visitor says something for the first time.
ማረጋገጫ
ይህ ማቆሚያ (endpoint)ይፋዊ ነው። ምንም ምስክርነት (credential) ወይም ድርጅት አይወስድም — የራሳችን የግብይት ጣቢያ እና የAI መልስ ሞተሮች የሚያነቡት ነው።
ይህ ኤንድፖይ መክፈቻ (endpoint) የድርጅት መታወቂያ (organisation id) አይወስድም። የእርስዎ ቁልፍ (key) እሱ የሚመለከተውን ድርጅት አስቀድሞ ይለያል፣ እና ምላሹም ለዚሁ የተወሰነ ነው።
ሞክሩት
በቅንፍ ውስጥ ያለውን ማንኛውንም ነገር በራስዎ እሴቶች ይተኩ፣ እና ቁልፍ ቦታ ያዢውን ከዳሽቦርድዎ በመጣ ቁልፍ ይተኩ።
curl -X POST https://api.zinndigital.com/v1/public/chat/{publicKey}/conversations \
-H "Content-Type: application/json" \
-d '{ "message": <string> }'ገብተዋል? የመቆጣጠሪያ ማዕከልዎ ውስጥ ያለው የኤፒአይ ኮንሶል ትክክለኛውን የድርጅት መታወቂያዎን እና የራስዎን ቁልፍ ይሞላል፣ እና ትክክለኛውን ምላሽ ማየት እንዲችሉ ጥያቄውን በቀጥታ ከሚሰራው ኤፒአይ ጋር ያካሂደዋል። ይህን ኤንድፖይንት በ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… |
የጥያቄ አካል
| ስም | ዓይነት | የሚያስፈልግ | ምንነቱ |
|---|---|---|---|
message | string | አዎ | — |
page_url | string | አይ | — |
page_title | string | አይ | — |
referrer | string | አይ | — |
locale | string | አይ | — |
name | string | አይ | — |
email | string | አይ | — |
ምላሽ
| ስም | ዓይነት | የሚያስፈልግ | ምንነቱ |
|---|---|---|---|
state | string<ai, waiting, open, offline, closed> | አዎ | — |
cursor | integer | አዎ | — |
poll_after_ms | integer | አዎ | 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[] | አዎ | — |
conversation_id | string | አዎ | — |
visitor_token | string | አዎ | 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