Tests API
Validate a test script
Validate a Playwright or k6 script using the same server-side rules as the Playground and CLI preflight checks.
Authorization
bearerAuth AuthorizationBearer <token>
Project-scoped CLI token (sck_live_* or sck_test_*) for documented API operations that accept bearer authentication. Interactive browser operations may require a session cookie. Trigger keys (sck_trigger_* / legacy job_*) are accepted only by job trigger endpoints.
In: header
Request Body
application/json
script*string
Test script content to validate
testType?string
Optional expected test type used for script/type compatibility checks
Value in
"browser" | "api" | "performance" | "database" | "custom"Response Body
application/json
application/json
application/json
curl -X POST "https://demo.supercheck.dev/api/validate-script" \ -H "Content-Type: application/json" \ -d '{ "script": "string" }'{
"valid": true,
"message": "string",
"warnings": [
"string"
]
}{
"valid": false,
"error": "string",
"warnings": [
"string"
],
"line": 0,
"column": 0,
"errorType": "string",
"isValidationError": true
}{
"error": "Unauthorized"
}Empty