public
POST /v1/public/chat-agents/{publicKey}/messages
One visitor turn — a question, and the answer from that site's own pages.
توثيقِ شناخت
یہ اینڈ پوائنٹ عوامی ہے۔ یہ کوئی اسناد اور کوئی تنظیم نہیں لیتا — یہ وہ ہے جسے ہماری اپنی مارکیٹنگ سائٹ اور AI کے جواب دینے والے انجن پڑھتے ہیں۔
یہ اینڈ پوائنٹ کوئی آرگنائزیشن آئی ڈی نہیں لیتا۔ آپ کی کلید پہلے ہی اس آرگنائزیشن کی شناخت کرتی ہے جس سے یہ تعلق رکھتی ہے، اور اس کا جواب اسی کے مطابق محدود ہوتا ہے۔
آزمائیں
کوئی بھی چیز جو زاویہ دار قوسین میں ہو اسے اپنی اقدار سے بدلیں، اور کلیدی پلیس ہولڈر کو اپنے ڈیش بورڈ کی کسی کلید سے بدلیں۔
curl -X POST https://api.zinndigital.com/v1/public/chat-agents/{publicKey}/messages \
-H "Content-Type: application/json" \
-d '{ "message": <string> }'لاگ ان ہیں؟ آپ کے ڈیش بورڈ میں موجود API کنسول آپ کی حقیقی تنظیم کی آئی ڈی اور آپ کی اپنی کلید خود بخود پُر کر دیتا ہے، اور لائیو API پر درخواست چلاتا ہے تاکہ آپ اصل ردعمل دیکھ سکیں۔ اس اینڈ پوائنٹ کو 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