ai

POST /v1/ai/site-agent/sites/{site_id}/check

Read this site's server, diagnose it, and fix what the customer allows.

All ai endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/ai/site-agent/sites/{site_id}/check \
  -H "Authorization: Bearer zdk_live_…"

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the 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

NameTypeRequiredWhat it is
site_id (path)UuidYes—

Response

NameTypeRequiredWhat it is
site_idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
sourcestring<ticket, self_serve, staff>Yes—
incompletebooleanYesTrue when any source could not be read or the diagnosis was partial.
refusedbooleanYes—
refusal_codestringNoallowance_exhausted or not_in_good_standing.
refusal_messagestringNo—
logsAiSiteAgentLogsYes—
findingsAiSiteAgentFinding[]Yes—
appliedobject[]YesFixes the AI applied, and under which mode.
offeredobject[]YesFixes found but NOT applied, with why. awaiting_your_approval means the customer asked to be asked; anything else names a refusal.
allowanceAiSiteAgentAllowanceNo—

Errors this endpoint can return

401 · 402 · 403 · 404 · 422 · 429