assistant
POST /v1/assistant/conversations/{conversationId}/messages
Ask the assistant a question and get its answer.
စစ်မှန်ကြောင်း အတည်ပြုခြင်း
API သော့တစ်ခုကို bearer token အဖြစ် ပို့ပါ။ သော့တွင် tickets.reply ခွင့်ပြုချက် ပါရှိရမည်ဖြစ်ပြီး၊ ၎င်းမပါရှိသော သော့ကို 404 အစား 403 ဖြင့် ငြင်းပယ်ပါမည်။
ဤ အမှတ်ဆက် (endpoint) သည် အဖွဲ့အစည်း အိုင်ဒီ (organisation id) ကို မယူပါ။ သင်၏ သော့ချက် (key) သည် ၎င်းပိုင်ဆိုင်သည့် အဖွဲ့အစည်းကို အလိုအလျောက် ဖော်ထုတ်ပြီးဖြစ်ကာ တုံ့ပြန်ချက်ကိုလည်း ၎င်းနှင့်သာ ကန့်သတ်ထားမည် ဖြစ်သည်။
စမ်းကြည့်ရန်
ထောင့်ချိတ်များအတွင်းရှိ မည်သည့်အရာကိုမဆို သင်၏ကိုယ်ပိုင်တန်ဖိုးများဖြင့် အစားထိုးပြီး သင့်ဒက်ရှ်ဘုတ်မှ သော့ချက်တစ်ခုဖြင့် key ကို အစားထိုးပါ။
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 ကွန်ဆိုးလ်တွင် သင့်၏ တကယ့်အဖွဲ့အစည်း ID နှင့် သင့်ကိုယ်ပိုင်သော့ချက်တို့ဖြင့် ဖြည့်သွင်းပေးပြီး တကယ့်တုံ့ပြန်ချက်ကို သင်မြင်နိုင်ရန် တိုက်ရိုက် API (live API) ကို အသုံးပြု၍ တောင်းဆိုမှုကို လုပ်ဆောင်ပေးပါသည်။ ဤအဆုံးသတ်အမှတ် (endpoint) ကို 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