curl https://www.getdiro.com/api/v1/templates \
-H "Authorization: Bearer diro_your_api_key"
const response = await fetch('https://www.getdiro.com/api/v1/templates', {
headers: {
'Authorization': 'Bearer diro_your_api_key',
},
});
const result = await response.json();
import requests
response = requests.get(
'https://www.getdiro.com/api/v1/templates',
headers={'Authorization': 'Bearer diro_your_api_key'},
)
result = response.json()
{
"success": true,
"data": {
"templates": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Leadership Assessment",
"description": "Comprehensive leadership evaluation report",
"pageSize": "A4",
"fieldsCount": 8,
"pagesCount": 2,
"isPublished": true,
"createdAt": "2025-01-15T09:00:00.000Z",
"updatedAt": "2025-01-20T14:30:00.000Z"
},
{
"id": "a1b2c3d4-5678-90ab-cdef-ghijklmnopqr",
"title": "Training Certificate",
"description": "Course completion certificate",
"pageSize": "A4",
"fieldsCount": 4,
"pagesCount": 1,
"isPublished": true,
"createdAt": "2025-01-10T11:00:00.000Z",
"updatedAt": "2025-01-18T16:00:00.000Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 2
}
},
"meta": {
"timestamp": "2025-01-22T10:35:00.000Z"
}
}
Templates
List Templates
Get a list of your templates
GET
/
templates
curl https://www.getdiro.com/api/v1/templates \
-H "Authorization: Bearer diro_your_api_key"
const response = await fetch('https://www.getdiro.com/api/v1/templates', {
headers: {
'Authorization': 'Bearer diro_your_api_key',
},
});
const result = await response.json();
import requests
response = requests.get(
'https://www.getdiro.com/api/v1/templates',
headers={'Authorization': 'Bearer diro_your_api_key'},
)
result = response.json()
{
"success": true,
"data": {
"templates": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Leadership Assessment",
"description": "Comprehensive leadership evaluation report",
"pageSize": "A4",
"fieldsCount": 8,
"pagesCount": 2,
"isPublished": true,
"createdAt": "2025-01-15T09:00:00.000Z",
"updatedAt": "2025-01-20T14:30:00.000Z"
},
{
"id": "a1b2c3d4-5678-90ab-cdef-ghijklmnopqr",
"title": "Training Certificate",
"description": "Course completion certificate",
"pageSize": "A4",
"fieldsCount": 4,
"pagesCount": 1,
"isPublished": true,
"createdAt": "2025-01-10T11:00:00.000Z",
"updatedAt": "2025-01-18T16:00:00.000Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 2
}
},
"meta": {
"timestamp": "2025-01-22T10:35:00.000Z"
}
}
Retrieve a paginated list of your templates.
integer
default:"20"
Number of templates to return (max 100)
integer
default:"0"
Offset for pagination
curl https://www.getdiro.com/api/v1/templates \
-H "Authorization: Bearer diro_your_api_key"
const response = await fetch('https://www.getdiro.com/api/v1/templates', {
headers: {
'Authorization': 'Bearer diro_your_api_key',
},
});
const result = await response.json();
import requests
response = requests.get(
'https://www.getdiro.com/api/v1/templates',
headers={'Authorization': 'Bearer diro_your_api_key'},
)
result = response.json()
{
"success": true,
"data": {
"templates": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Leadership Assessment",
"description": "Comprehensive leadership evaluation report",
"pageSize": "A4",
"fieldsCount": 8,
"pagesCount": 2,
"isPublished": true,
"createdAt": "2025-01-15T09:00:00.000Z",
"updatedAt": "2025-01-20T14:30:00.000Z"
},
{
"id": "a1b2c3d4-5678-90ab-cdef-ghijklmnopqr",
"title": "Training Certificate",
"description": "Course completion certificate",
"pageSize": "A4",
"fieldsCount": 4,
"pagesCount": 1,
"isPublished": true,
"createdAt": "2025-01-10T11:00:00.000Z",
"updatedAt": "2025-01-18T16:00:00.000Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 2
}
},
"meta": {
"timestamp": "2025-01-22T10:35:00.000Z"
}
}
⌘I