ai
POST /v1/ai/site-agent/sites/{site_id}/check
Read this site's server, diagnose it, and fix what the customer allows.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso sites.view; 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/ai/site-agent/sites/{site_id}/check \
-H "Authorization: Bearer zdk_live_…"¿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
Reads the site's live server — error log, PHP faults, slow queries, disk and memory — diagnoses what is wrong, and applies the fixes this customer has allowed to run unattended. Fixes they have asked to be asked about come back in `offered` with the finding that triggered them, so the screen can show the button. Log text is **redacted before it leaves the server**: visitor IP addresses, email addresses, tokens, keys and passwords are masked, and `logs.sources[].masked` reports how many runs of each kind were removed. On our own fleet the server-wide error log is filtered to this account on the host, so another tenant's lines are never transferred at all. A source that could not be read is returned with `state: unavailable` and a reason, **never omitted** — "we found nothing wrong" and "we could not look" are different answers and only one of them is reassuring. `incomplete` is true whenever any source is in that state. Counts against the monthly allowance. A `402` means the allowance is exhausted or the account is not in good standing; the body carries the allowance and a message. Requires `sites.view`.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
site_id (path) | Uuid | Sí | — |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
site_id | Uuid | Sí | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
source | string<ticket, self_serve, staff> | Sí | — |
incomplete | boolean | Sí | True when any source could not be read or the diagnosis was partial. |
refused | boolean | Sí | — |
refusal_code | string | No | `allowance_exhausted` or `not_in_good_standing`. |
refusal_message | string | No | — |
logs | AiSiteAgentLogs | Sí | — |
findings | AiSiteAgentFinding[] | Sí | — |
applied | object[] | Sí | Fixes the AI applied, and under which mode. |
offered | object[] | Sí | Fixes found but NOT applied, with why. `awaiting_your_approval` means the customer asked to be asked; anything else names a refusal. |
allowance | AiSiteAgentAllowance | No | — |
Errores que este endpoint puede devolver
401 · 402 · 403 · 404 · 422 · 429