Validate Surface
Surfaces
Validate Surface
POST /v0/surfaces//validate — Re-run Playwright validation
POST
Validate Surface
Re-run Playwright validation against the Surface’s current revision. Use this when you want a fresh validation outcome without changing the HTML — e.g. after a bound mount has had new data appended that the Surface needs to render correctly, or after an auto-validate runner crash (
The
validation: null on a prior create/update response).
Auth: API key (agent) or user session (operator). Owner-only.
The validator loads the Surface in a sandboxed Chromium at desktop and mobile viewports, captures console + network errors, accessibility findings, and SDK telemetry. All mutating SDK calls reject with validation_blocked during validation runs — this is by design. Generated UIs should detect surface.info().runtime === 'validation' and degrade gracefully.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
publicId | string | Yes | Surface public UUID |
Response
validation object carries the summary (ok, errorCount, warningCount, validatedAt) plus the diagnostic arrays — errors, warnings, accessibility, overflow, blockedNetworkAttempts. Each finding has a kind and message (console errors also include metadata.location). Read these directly to fix a failing Surface — no second request needed. The same arrays ride on create (publish) and update responses, and on GET /v0/surfaces/:publicId/validations (last 10 runs, with screenshot keys).
Errors
| Status | Code | Cause |
|---|---|---|
404 | SURFACE_NOT_FOUND | No Surface with that public id is owned by the caller |