assistant
POST /v1/assistant/conversations/{conversationId}/messages
Ask the assistant a question and get its answer.
ການພິສູດຕົວຕົນ
ສົ່ງລະຫັດ API ເປັນ bearer token. ລະຫັດຕ້ອງມີສິດ tickets.reply; ລະຫັດທີ່ບໍ່ມີສິດດັ່ງກ່າວຈະຖືກປະຕິເສດດ້ວຍລະຫັດ 403, ບໍ່ແມ່ນ 404.
ຈຸດເຊື່ອມຕໍ່ນີ້ບໍ່ໄດ້ຮັບ ID ອົງກອນ. ລະຫັດຂອງທ່ານໄດ້ລະບຸອົງກອນທີ່ມັນຂຶ້ນກັບແລ້ວ, ແລະ ຄໍາຕອບແມ່ນຖືກຈໍາກັດຂອບເຂດໄວ້ສໍາລັບອົງກອນນັ້ນ.
ລອງໃຊ້ເບິ່ງ
ປ່ຽນແທນທຸກຢ່າງທີ່ຢູ່ໃນວົງເລັບມຸມດ້ວຍຄ່າຂອງທ່ານເອງ, ແລະ ປ່ຽນແທນຕົວແທນບ່ອນວ່າງຄີດ້ວຍຄີຈາກແຜງຄວບຄຸມຂອງທ່ານ.
curl -X POST https://api.zinndigital.com/v1/assistant/conversations/{conversationId}/messages \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "question": <string> }'ເຂົ້າສູ່ລະບົບແລ້ວບໍ? ໂຄງສົນທະນາ API ໃນໜ້າັດສະຫຼອງຂອງທ່ານຈະຕື່ມຂໍ້ມູນລະຫັດອົງກອນຕົວຈິງ ແລະ ລະຫັດລັບສ່ວນຕົວຂອງທ່ານໂດຍອັດຕະໂນມັດ, ແລະ ປະຕິບັດການຮ້ອງຂໍຜ່ານ API ຕົວຈິງ ເພື່ອໃຫ້ທ່ານສາມາດເຫັນຜົນຕອບຮັບທີ່ແທ້ຈິງໄດ້. ເປີດຈຸດສິ້ນສຸດນີ້ໃນຄອນໂສລ API
ລາຍລະອຽດ
Synchronous: one request, two persisted turns, and the answer in the response. ⛔ Not `202` with a poll — §2.16 forbids an interactive path behind a job queue, and a chat that answers on the next poll is not a chat. Expect several seconds. The answer is grounded in **published knowledge-base articles** and, when `site_id` names one of your own sites, that site's health as read from our monitoring database. It cannot see another tenant's data, an unpublished draft, or a staff internal note — those are excluded by what the engine fetches, not by asking the model. It **cannot act**: no tool on this path changes anything. A `503` is a refusal fit to show the customer, and its `error_code` distinguishes the reasons — `ASSISTANT_DAILY_LIMIT`, `ASSISTANT_DISABLED`, `ASSISTANT_FAILED`, `ASSISTANT_UNAVAILABLE`. ⭐ Four, not six: an empty or over-long question is refused by validation as a `422` before anything is spent, so its code never reaches this response. Requires `tickets.reply`.
ພາຣາມິເຕີ
| ຊື່ | ປະເພດ | ຕ້ອງການ | ສິ່ງທີ່ມັນເປັນ |
|---|---|---|---|
conversationId (path) | Uuid | ແມ່ນແລ້ວ | The conversation's id. |
ເນື້ອຫາຂອງຄຳຮ້ອງ
| ຊື່ | ປະເພດ | ຕ້ອງການ | ສິ່ງທີ່ມັນເປັນ |
|---|---|---|---|
question | string | ແມ່ນແລ້ວ | The customer's question, in their own language. Longer than this is a paste, not a question, and an unbounded prompt is an unbounded bill — so it is a `422`. |
site_id | Uuid | ບໍ່ | Which of your sites this is about. ⛔ Validated against your own sites before anything is read — an id from a client is a request, not a fact. |
page_context | string | ບໍ່ | The screen you asked from, as a route path — e.g. `/sites/{siteId}/backups`. "Why is this failing?" asked on the backups screen and on the DNS screen are different questions, an… |
ຖືກໂຈະ
| ຊື່ | ປະເພດ | ຕ້ອງການ | ສິ່ງທີ່ມັນເປັນ |
|---|---|---|---|
id | Uuid | ແມ່ນແລ້ວ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
role | AssistantRole | ແມ່ນແລ້ວ | — |
text | string | ແມ່ນແລ້ວ | — |
cited_slugs | string[] | ແມ່ນແລ້ວ | Knowledge-base slugs the answer used, for `/kb/<slug>` links. ⭐ Always a subset of what the engine supplied — a slug the model invented is dropped, because a fabricated citation… |
needs_human | boolean | ແມ່ນແລ້ວ | The model's own statement that it could not answer from what it was given. Recorded from its structured output, never inferred from the prose. This is what the "open a ticket" p… |
created_at | string | ແມ່ນແລ້ວ | — |
ຂໍ້ຜິດພາດທີ່ຈຸດເຊື່ອມຕໍ່ນີ້ສາມາດສົ່ງຄືນໄດ້
401 · 403 · 404 · 422 · 429 · 503