public

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

A visitor says something for the first time.

כל נקודות הקצה מסוג public

כל תיעוד המפתחים

אימות

נקודת קצה זו היא ציבורית. היא אינה דורשת שורת פרטי זיהוי ואינה דורשת ארגון – זהו המידע שאתרי השיווק ומנועי התשובות מבוססי ה-AI שלנו קוראים.

נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

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