/v1/schemas/{schema_id}/render_templates
API Key
Create render template
Create a new custom render template for a credential schema. The template content
must be valid SVG (for svg_mustache) or HTML (for pdf_mustache). Mustache variables
like {{name}} will be replaced with credential claims when rendering.
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 creating a render template
name
*
string
Human-readable template name
Example: Employee Badge Card
description
string
Description of the template
Example: Visual template for employee badge credentials
render_suite
*
string
Template rendering engine
Allowed values: "svg_mustache", "pdf_mustache"
Example: svg_mustache
content
*
string
Template content (SVG or HTML)
Example: <svg xmlns="http://www.w3.org/2000/svg"><text>{{name}}</text></svg>
Response
Content-Type: application/json
success
boolean
data
object
A visual rendering template for credentials (SVG or PDF)
id
*
string
Unique template identifier
Example: nZaPYEp78T82P57z0NRl
name
*
string
Human-readable template name
Example: Employee Badge
description
string
nullable
Description of the template
Example: Professional badge design for employee credentials
render_suite
*
string
Template rendering engine: - svg_mustache: SVG template with Mustache variables - pdf_mustache: HTML template converted to PDF
Allowed values: "svg_mustache", "pdf_mustache"
Example: svg_mustache
template_type
*
string
Template origin: - custom: Created by issuer via API or dashboard - system: Built-in template (cannot be modified or deleted)
Allowed values: "custom", "system"
Example: custom
media_type
*
string
MIME type of the rendered output
Allowed values: "image/svg+xml", "application/pdf"
Example: image/svg+xml
digest_multibase
*
string
SHA-256 hash of template content (multibase base64url encoded)
Example: uQvLKPJfT5c...
render_properties
array[string]
nullable
JSON Pointers to claims rendered by this template
Example: ["/credentialSubject/name","/credentialSubject/employer"]
Array items:
exposed_fields
array[string]
Field names extracted from render_properties
Example: ["name","employer"]
Array items:
content
string
nullable
Template content (only included when specifically requested)
Example: <svg>...</svg>
created_at
*
string (date-time)
When the template was created
Example: 2025-01-01T00:00:00Z
updated_at
*
string (date-time)
When the template was last updated
Example: 2025-01-15T10:30:00Z
Code Examples
import os
from aho_sdk import AhoSdk
client = AhoSdk.schemas(api_key=os.environ["AHO_API_KEY"])
result = client.render_templates.create(
schema_id="example_schema_id",
body={
"name": "Employee Badge Card",
"description": "Visual template for employee badge credentials",
"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.create(
schema_id: "example_schema_id",
body: {
name: "Employee Badge Card",
description: "Visual template for employee badge credentials",
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.create({
schemaId: "example_schema_id",
body: {
name: "Employee Badge Card",
description: "Visual template for employee badge credentials",
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' \
-H 'X-API-Key: $AHO_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Employee Badge Card",
"description": "Visual template for employee badge credentials",
"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