ai
POST /v1/ai/site-agent/sites/{site_id}/check
Read this site's server, diagnose it, and fix what the customer allows.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie sites.view beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/ai/site-agent/sites/{site_id}/check \
-H "Authorization: Bearer zdk_live_…"Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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`.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
site_id (path) | Uuid | Ja | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
site_id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
source | string<ticket, self_serve, staff> | Ja | — |
incomplete | boolean | Ja | True when any source could not be read or the diagnosis was partial. |
refused | boolean | Ja | — |
refusal_code | string | Nee | `allowance_exhausted` or `not_in_good_standing`. |
refusal_message | string | Nee | — |
logs | AiSiteAgentLogs | Ja | — |
findings | AiSiteAgentFinding[] | Ja | — |
applied | object[] | Ja | Fixes the AI applied, and under which mode. |
offered | object[] | Ja | Fixes found but NOT applied, with why. `awaiting_your_approval` means the customer asked to be asked; anything else names a refusal. |
allowance | AiSiteAgentAllowance | Nee | — |
Fouten die dit eindpunt kan retourneren
401 · 402 · 403 · 404 · 422 · 429