public
POST /v1/public/chat-agents/{publicKey}/messages
One visitor turn — a question, and the answer from that site's own pages.
المصادقة
هذه نقطة النهاية عامة. فهي لا تتطلب أي بيانات اعتماد ولا أي مؤسسة - بل هي ما تقرؤه مواقعنا التسويقية ومحركات الإجابة بالذكاء الاصطناعي الخاصة بنا.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/public/chat-agents/{publicKey}/messages \
-H "Content-Type: application/json" \
-d '{ "message": <string> }'هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
The agent answers only from content belonging to this one site. That is enforced in the database query, not by instructing the model, so there is no phrasing a visitor can use to reach another customer's content. handoff_suggested is its own field and is not an error. It is true when the agent could not find the answer on the site — nothing is broken, those pages simply do not say — and the right response is to offer a person, never a guess. refusal is present only when the turn was refused rather than answered, and names the class so a widget can render the right thing: provider_outage, credential_problem, refused (a deliberate decline, such as a monthly cap reached) or unavailable (our fault, and no vendor is named). Answers 404 for an unauthorised Origin, exactly as the config route does and for the same reason.
المعلمات
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
publicKey (path) | string | نعم | The agent's public key, as carried in the embed snippet. |
جسم الطلب
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
message | string | نعم | — |
conversation_id | string | لا | Continue an existing thread. Omit to start one. |
locale | string | لا | The visitor's language. The agent answers in this, not in the site owner's language. |
page_url | string | لا | — |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
conversation_id | string | نعم | — |
reply | string | نعم | — |
citations | object[] | نعم | The pages of this site the answer was drawn from. |
handoff_suggested | boolean | نعم | ⛔ Not an error. true means the agent could not answer from this site's content and a person should take over. Rendering it as a fault would blame a vendor outage for an… |
refusal | string<provider_outage, credential_problem, refused, unavailable> | لا | Present only when the turn was refused rather than answered. refused is a deliberate decline of ours (a monthly cap reached, an agent switched off) and names no vendor;… |
failure | VendorFailure | لا | The classified §2.57 failure behind a refusal — which vendor, whose key, which door. ⛔ Returned ONLY by the owner's preview endpoint; the public widget endpoint never carries it,… |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
404 · 429