For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • POSTValidate Liquid template
      • POSTValidate transform code
Dashboard
LogoLogo
Runtype APIValidation

Validate transform code

POST
/v1/validate/transform-code
POST
/v1/validate/transform-code
$curl -X POST https://api.runtype.com/v1/validate/transform-code \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "code": "const result = data.map(item => item.value * 2);"
>}'
1{
2 "issues": [],
3 "valid": true
4}

Lightweight per-keystroke code validator for the dashboard transform-data step editor.

Was this page helpful?
Previous
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Request

This endpoint expects an object.
codestringRequired>=1 character
JavaScript code to validate
availableVariableslist of stringsOptional
List of available variable names
languagestringOptional

Code language (default: javascript)

sandboxProviderstringOptional

Sandbox provider (default: cloudflare-worker)

Response

Validation result
issueslist of objects
validboolean

Errors

400
Bad Request Error
413
Content Too Large Error
500
Internal Server Error