API ReferenceTemplate
Preview & Duplicate
Render a template with test variables, or duplicate a template across locales / organizations.
RPCs
| Method | Path |
|---|---|
| PreviewTemplate | POST /v1/templates:preview |
| DuplicateTemplate | POST /v1/templates/{id}:duplicate |
Base URL: https://<Domain id="api"/>
Authentication: Bearer token with template:read (Preview) or :write (Duplicate).
Preview -- render with test variables
const res = await fetch("https://api-id.avnology.net/v1/templates:preview", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AVNOLOGY_API_KEY}`,
"Content-Type": "application/json"
body := strings.NewReader(`{
"template_id":"tpl_01H7X",
"variables":{
"identity":{"first_name":"Jane","email":"[email protected]"},
"link":"https://id.avnology.net/verify?token=abc"
}
}`)
req, _ := http.
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates:preview",
json={
"template_id": template_id,
"variables": {
"identity": {"first_name": "Jane", "email"
curl -X POST "https://api-id.avnology.net/v1/templates:preview" \
-H "Authorization: Bearer $AVNOLOGY_API_KEY" \
const res = await fetch("https://api-id.avnology.net/v1/templates:preview", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AVNOLOGY_API_KEY}`,
"Content-Type": "application/json"
body := strings.NewReader(`{
"template_id":"tpl_01H7X",
"variables":{
"identity":{"first_name":"Jane","email":"[email protected]"},
"link":"https://id.avnology.net/verify?token=abc"
}
}`)
req, _ := http.
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates:preview",
json={
"template_id": template_id,
"variables": {
"identity": {"first_name": "Jane", "email"
curl -X POST "https://api-id.avnology.net/v1/templates:preview" \
-H "Authorization: Bearer $AVNOLOGY_API_KEY" \
const res = await fetch("https://api-id.avnology.net/v1/templates:preview", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AVNOLOGY_API_KEY}`,
"Content-Type": "application/json"
body := strings.NewReader(`{
"template_id":"tpl_01H7X",
"variables":{
"identity":{"first_name":"Jane","email":"[email protected]"},
"link":"https://id.avnology.net/verify?token=abc"
}
}`)
req, _ := http.
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates:preview",
json={
"template_id": template_id,
"variables": {
"identity": {"first_name": "Jane", "email"
curl -X POST "https://api-id.avnology.net/v1/templates:preview" \
-H "Authorization: Bearer $AVNOLOGY_API_KEY" \
const res = await fetch("https://api-id.avnology.net/v1/templates:preview", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AVNOLOGY_API_KEY}`,
"Content-Type": "application/json"
body := strings.NewReader(`{
"template_id":"tpl_01H7X",
"variables":{
"identity":{"first_name":"Jane","email":"[email protected]"},
"link":"https://id.avnology.net/verify?token=abc"
}
}`)
req, _ := http.
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates:preview",
json={
"template_id": template_id,
"variables": {
"identity": {"first_name": "Jane", "email"
Duplicate -- clone to another locale or org
POST /v1/templates/{id}:duplicate with body { "target_locale": "de", "target_organization_id": null } returns a new template ID with the same content, ready to translate.