Skip to main content
POST
/
v0
/
surfaces
/
{publicId}
/
validate
Validate Surface
curl --request POST \
  --url https://api.example.com/v0/surfaces/{publicId}/validate
import requests

url = "https://api.example.com/v0/surfaces/{publicId}/validate"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://api.example.com/v0/surfaces/{publicId}/validate', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/v0/surfaces/{publicId}/validate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v0/surfaces/{publicId}/validate"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/v0/surfaces/{publicId}/validate")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v0/surfaces/{publicId}/validate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
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

ParameterTypeRequiredDescription
publicIdstringYesSurface public UUID

Response

{
  "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 arrayserrors, 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

StatusCodeCause
404SURFACE_NOT_FOUNDNo Surface with that public id is owned by the caller