API ReferenceValidation Scripts
Update Validation Script
Change script metadata without uploading a new source version
PATCH
/api/v1/extraction-schema/{extractionSchemaId}/validation-scripts/{key}Updates metadata on a registered script. The source and version are untouched — use Push to ship new code.
Setting enabled: false stops the script from running after extraction while keeping the script and all of its past results. This is the reversible alternative to Delete.
Requires the EDIT_MODELS permission (OWNER or DEVELOPER).
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
extractionSchemaId | string | path | Yes | The model or deployment's extraction schema ID, returned when listing a project's deployments. |
key | string | path | Yes | The script key |
name | string | body | No | New name |
description | string | body | No | New description, or null to clear it |
behavior | string | body | No | SURFACE or RESEND |
enabled | boolean | body | No | Whether the script runs after extraction |
timeoutMs | number | body | No | Per-run timeout in milliseconds, 1000–600000 |
At least one body field must be provided.
Request
const res = await fetch(
"https://app.limai.io/api/v1/extraction-schema/esch_abc123/validation-scripts/vin-checksum",
{
method: "PATCH",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({ enabled: false }),
}
);Response
Response200
{
"script": {
"id": "cvs_abc123",
"extractionSchemaId": "esch_abc123",
"key": "vin-checksum",
"name": "VIN format (ISO 3779)",
"description": "Validates the VIN against the ISO 3779 format",
"behavior": "RESEND",
"s3Key": "custom-validations/esch_abc123/vin-checksum/v3-9f2b7c1d4e05.mjs",
"version": 3,
"contentHash": "9f2b...",
"enabled": false,
"timeoutMs": 60000,
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-20T09:00:00.000Z"
}
}