Documentation version: Latest (v1)
API endpoint
List templates
Paginated list of accessible templates.
GET/api/v1/templates?page=1&limit=20
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 |
|---|---|---|---|
| page | number | No | Page number (default 1). |
| limit | number | No | Items per page (1-100). |
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?page=1&limit=20" \
-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": [
"page",
"limit",
"total",
"items"
],
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"subject",
"updatedAt"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"subject": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
}
}
}
}
}
}Success response example
{
"success": true,
"data": {
"page": 1,
"limit": 20,
"total": 42,
"items": [
{
"id": "tpl_welcome",
"name": "Welcome",
"subject": "Welcome to Risu Mail",
"updatedAt": "2026-04-19T10:19:31.000Z"
}
]
}
}Common error cases
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | SCOPE_REQUIRED | mail_api scope missing. |
Implementation notes
- Use with GET template endpoint for cache warming in API clients.