Validate Parsing Script

Validate a JavaScript parsing script without running it against real data. Upload your .js file as multipart/form-data under the `file` field. The endpoint runs the same V8 sandbox that `json_handler` uses at indexing time, so a script that validates here will work when you index files. Checks: 1. JavaScript syntax parses cleanly 2. Script exports a default function Returns HTTP 200 for both valid and invalid scripts — `valid: false` is a business-logic result, not an HTTP error. 4xx/5xx responses indicate auth failures, malformed requests, or service unavailability.

Headers

authorizationstring or nullOptional

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The .js parsing script file to validate.

Response

Successful Response
validboolean
True if the script passes all validation checks
errorstring or null

Human-readable error message when valid=false. Null when valid=true.

error_typestring or null

Error category when valid=false: ‘syntax_error’, ‘no_export’. Null when valid=true.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
413
Content Too Large Error
503
Service Unavailable Error