API ReferenceTemplate
Email Templates
CRUD for transactional email templates.
RPCs
| Method | Path |
|---|---|
| ListEmailTemplates | GET /v1/templates/email |
| GetEmailTemplate | GET /v1/templates/email/{id} |
| CreateEmailTemplate | POST /v1/templates/email |
| UpdateEmailTemplate | PATCH /v1/templates/email/{id} |
| DeleteEmailTemplate | DELETE /v1/templates/email/{id} |
Base URL: https://<Domain id="api"/>
Authentication: Bearer token with template:write.
Template shape
{
"id": "tpl_01H7X...",
"type": "verification",
Valid type values: verification, recovery, invitation, magic_link, mfa_code, password_changed_notice, new_device_notice.
Create a template
body := strings.NewReader(`{
"type":"verification","locale":"en",
"subject":"Verify your email",
"html_body":"<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body":"Hi {{identity.first_name}}, visit {{link}}"
}`)
req, _ := http.NewRequest
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates/email",
json={
"type": "verification",
"locale": "en",
"subject": "Verify your email"
curl -X POST "https://api-id.avnology.net/v1/templates/email" \
-H "Authorization: Bearer $AVNOLOGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "verification",
"locale": "en",
"subject": "Verify your email",
"html_body": "<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body": "Hi {{identity.first_name}}, visit {{link}}"
}'body := strings.NewReader(`{
"type":"verification","locale":"en",
"subject":"Verify your email",
"html_body":"<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body":"Hi {{identity.first_name}}, visit {{link}}"
}`)
req, _ := http.NewRequest
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates/email",
json={
"type": "verification",
"locale": "en",
"subject": "Verify your email"
curl -X POST "https://api-id.avnology.net/v1/templates/email" \
-H "Authorization: Bearer $AVNOLOGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "verification",
"locale": "en",
"subject": "Verify your email",
"html_body": "<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body": "Hi {{identity.first_name}}, visit {{link}}"
}'body := strings.NewReader(`{
"type":"verification","locale":"en",
"subject":"Verify your email",
"html_body":"<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body":"Hi {{identity.first_name}}, visit {{link}}"
}`)
req, _ := http.NewRequest
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates/email",
json={
"type": "verification",
"locale": "en",
"subject": "Verify your email"
curl -X POST "https://api-id.avnology.net/v1/templates/email" \
-H "Authorization: Bearer $AVNOLOGY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "verification",
"locale": "en",
"subject": "Verify your email",
"html_body": "<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body": "Hi {{identity.first_name}}, visit {{link}}"
}'body := strings.NewReader(`{
"type":"verification","locale":"en",
"subject":"Verify your email",
"html_body":"<p>Hi {{identity.first_name}}, click <a href={{link}}>here</a>.</p>",
"text_body":"Hi {{identity.first_name}}, visit {{link}}"
}`)
req, _ := http.NewRequest
import httpx, os
httpx.post(
"https://api-id.avnology.net/v1/templates/email",
json={
"type": "verification",
"locale": "en",
"subject": "Verify your email"