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 کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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