/v1/schemas/{schema_id}/render_templates/validate
API Key
Validate template
Validate template content without saving. Returns validation errors, warnings,
computed digest, and extracted Mustache variables. Useful for previewing templates
before creating them.
Parameters
| Name | Location | Type | Description |
|---|---|---|---|
schema_id
*
|
path | string | Schema ID |
X-API-Key
*
|
header | string | API key for issuer authentication |
* Required parameter
Request Body
Parameters for validating a render template
render_suite
*
string
Template rendering engine
Allowed values: "svg_mustache", "pdf_mustache"
Example: svg_mustache
content
*
string
Template content to validate
Example: <svg xmlns="http://www.w3.org/2000/svg"><text>{{name}}</text></svg>
Response
Content-Type: application/json
success
boolean
data
object
Result of template validation without saving
success
boolean
Whether the API call succeeded
Example: true
valid
boolean
Whether the template is valid
Example: true
digest_multibase
string
nullable
Computed hash (only if valid)
Example: uQvLKPJfT5cXyz123...
extracted_variables
array[string]
Mustache variables found in the template
Example: ["name","employer","jobTitle"]
Array items:
errors
array[string]
Validation errors (only if invalid)
Array items:
warnings
array[string]
Non-fatal warnings about the template
Array items:
Code Examples
import os
from aho_sdk import AhoSdk
client = AhoSdk.schemas(api_key=os.environ["AHO_API_KEY"])
result = client.render_templates.validate(
schema_id="example_schema_id",
body={
"render_suite": "svg_mustache",
"content": "<svg xmlns=\"http://www.w3.org/2000/svg\"><text>{{name}}</text></svg>"
}
)
client = AhoSdk.schemas(api_key: ENV["AHO_API_KEY"])
result = client.render_templates.validate(
schema_id: "example_schema_id",
body: {
render_suite: "svg_mustache",
content: "<svg xmlns=\"http://www.w3.org/2000/svg\"><text>{{name}}</text></svg>"
}
)
import { AhoSdk } from '@aho/sdk';
const client = AhoSdk.schemas({ apiKey: process.env.AHO_API_KEY });
const result = await client.render_templates.validate({
schemaId: "example_schema_id",
body: {
renderSuite: "svg_mustache",
content: "<svg xmlns=\"http://www.w3.org/2000/svg\"><text>{{name}}</text></svg>"
}
});
curl -X POST 'https://api.aho.com/v1/schemas/example_schema_id/render_templates/validate' \
-H 'X-API-Key: $AHO_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"render_suite": "svg_mustache",
"content": "<svg xmlns=\"http://www.w3.org/2000/svg\"><text>{{name}}</text></svg>"
}'
Try It
Log in to test this endpoint directly from the documentation.
Log in