> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenrip.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Surface

> POST /v0/surfaces/{publicId}/validate — Re-run Playwright validation

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

```json theme={null}
{
  "ok": true,
  "data": {
    "validation": {
      "id": "v03...",
      "revisionId": "d58c...",
      "ok": false,
      "errorCount": 1,
      "warningCount": 0,
      "validatedAt": "2026-05-26T09:05:00.000Z",
      "errors": [
        {
          "kind": "console_error",
          "message": "Uncaught ReferenceError: useTable is not defined",
          "metadata": { "location": { "url": "...", "lineNumber": 42 } }
        }
      ],
      "warnings": [],
      "accessibility": [],
      "overflow": [],
      "blockedNetworkAttempts": []
    }
  }
}
```

The `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](/api-reference/surfaces/publish-surface)) and [update](/api-reference/surfaces/update-surface) responses, and on [`GET /v0/surfaces/:publicId/validations`](/api-reference/surfaces/get-surface) (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 |
