assistant

POST /v1/assistant/conversations/{conversationId}/messages

Ask the assistant a question and get its answer.

Wszystkie punkty końcowe assistant

Wszystkie dokumentacje dla programistów

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie tickets.reply; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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> }'

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Parametry

NazwaTypWymaganeCo to jest
conversationId (path)UuidTakThe conversation's id.

Treść żądania

NazwaTypWymaganeCo to jest
questionstringTakThe 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_idUuidNieWhich 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_contextstringNieThe 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, and…

Odpowiedź

NazwaTypWymaganeCo to jest
idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
roleAssistantRoleTak
textstringTak
cited_slugsstring[]TakKnowledge-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_humanbooleanTakThe 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"…
created_atstringTak

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 422 · 429 · 503