Documentation version: Latest (v1)
API endpoint
Get a single template
Returns full template payload including html/text body.
GET/api/v1/templates/{templateId}
Auth: Bearer API key with mail_api scope
Required headers
| Header | Required | Value | Description |
|---|---|---|---|
| Authorization | Yes | Bearer <token> | API key, server OTP key, or public OTP token depending on endpoint. |
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| templateId | path string | Yes | Template id path param. |
Code examples (all supported languages)
Snippets use placeholder tokens. Replace them with real credentials from your dashboard.
curl -X GET "https://risumail.risu.in/api/v1/templates/tpl_welcome" \
-H "Authorization: Bearer YOUR_API_KEY"Response schema
Canonical schema inferred from the documented success payload. Copy this block when generating typed clients.
{
"type": "object",
"required": [
"success",
"data"
],
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"required": [
"id",
"name",
"subject",
"htmlBody",
"textBody"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"subject": {
"type": "string"
},
"htmlBody": {
"type": "string"
},
"textBody": {
"type": "string"
}
}
}
}
}Success response example
{
"success": true,
"data": {
"id": "tpl_welcome",
"name": "Welcome",
"subject": "Welcome {{firstName}}",
"htmlBody": "<h1>Welcome {{firstName}}</h1>",
"textBody": "Welcome {{firstName}}"
}
}Common error cases
| Status | Code | When |
|---|---|---|
| 404 | TEMPLATE_NOT_FOUND | Template does not exist for account. |
| 401 | UNAUTHORIZED | API key invalid. |
Implementation notes
- Minimum template id length is validated on route entry.