assistant

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

Ask the assistant a question and get its answer.

Todos los endpoints de assistant

Autenticación

Envía una clave de API como token de portador. La clave debe tener el permiso tickets.reply; una clave que no lo tenga se rechazará con un código 403, no 404.

Este endpoint no requiere ningún id de organización. Su clave ya identifica la organización a la que pertenece, y la respuesta está delimitada a ella.

Pruébalo

Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.

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

¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API

Detalles

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`.

Parámetros

NombreTipoObligatorio¿Qué es esto?
conversationId (path)UuidThe conversation's id.

Cuerpo de la solicitud

NombreTipoObligatorio¿Qué es esto?
questionstringThe 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_idUuidNoWhich 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_contextstringNoThe 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…

Respuesta

NombreTipoObligatorio¿Qué es esto?
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
roleAssistantRole
textstring
cited_slugsstring[]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_humanbooleanThe 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_atstring

Errores que este endpoint puede devolver

401 · 403 · 404 · 422 · 429 · 503