Skip to main content
POST /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

application/json

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

200 Validation result (invalid)

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>"
    }
)

Try It

Log in to test this endpoint directly from the documentation.

Log in