public

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

A visitor says something for the first time.

બધા public એન્ડપૉઇન્ટ્સ

બધા ડેવલપર દસ્તાવેજો

પ્રમાણીકરણ

આ એન્ડપૉઇન્ટ સાર્વજનિક છે. તે કોઈ ઓળખપત્ર કે કોઈ સંસ્થા લેતો નથી — તે એ છે જે અમારી પોતાની માર્કેટિંગ સાઇટ અને AI જવાબ આપતા એન્જિન વાંચે છે.

આ એન્ડપૉઇન્ટ કોઈ સંસ્થા આઈડી (organisation id) લેતું નથી. તમારી કી (key) પહેલેથી જ તે જે સંસ્થા સાથે સંબંધિત છે તેની ઓળખ કરે છે, અને પ્રતિસાદ (response) તે જ પૂરતો મર્યાદિત છે.

આયમાવો

કોઈપણ કૌંસમાં રહેલી બાબતને તમારા પોતાના મૂલ્યોથી બદલો અને કી પ્લેસહોલ્ડરને તમારા ડેશબોર્ડની કીથી બદલો.

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ના

જવાબ

નામપ્રકારજરૂરીતે શું છે
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