List Templates
This service allows you to create custom templates that can later be used to fill out documents for signing.
GET /template
Authentication
Include your public key in the Authorization header.
Authorization: puk_xxx...
Request Parameters
This endpoint does not receive parameters in the body or query params. It only requires the authorization header.
Request Examples
- curl
- Python
- Node.js
curl -X GET "https://dev.auco.ai/v1.5/ext/template" \
-H "Authorization: your_public_key"
import requests
def get_templates():
url = "https://dev.auco.ai/v1.5/ext/template"
headers = {
"Authorization": "your_public_key"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
print("Templates retrieved successfully")
for tpl in data.get("data", []):
print(f"- ID: {tpl['id']} | Name: {tpl['name']}")
return data
except requests.exceptions.RequestException as error:
detail = (
error.response.json()
if hasattr(error, "response") and error.response is not None
else error
)
print(f"Error retrieving templates: {detail}")
if __name__ == "__main__":
get_templates()
const axios = require('axios');
async function getTemplates() {
try {
const response = await axios.get(
'https://dev.auco.ai/v1.5/ext/template',
{
headers: {
Authorization: 'your_public_key',
},
}
);
console.log('Templates retrieved successfully');
const data = response.data;
if (Array.isArray(data.data)) {
data.data.forEach((tpl) => {
console.log(`- ID: ${tpl.id} | Name: ${tpl.name}`);
});
}
return data;
} catch (error) {
console.error(
'Error retrieving templates:',
error.response?.data || error.message
);
}
}
getTemplates();
Response Example
{
"data": [
{
"id": "template_id",
"name": "Test document variable modification",
"created_at": "2025-11-26T20:48:00.000Z",
"updated_at": "2025-11-26T20:48:00.000Z",
"status": "active"
},
{
"id": "template_id",
"name": "Purchase agreement",
"created_at": "2025-11-20T15:10:00.000Z",
"updated_at": "2025-11-21T09:30:00.000Z",
"status": "active"
}
]
}
Response Properties
| Property | Type | Description |
|---|---|---|
data | array | List of templates |
data[].id | string | Unique template identifier |
data[].name | string | Readable template name |
data[].status | string | Template status (e.g. active, inactive) |
data[].created_at | string (ISO 8601) | Template creation date |
data[].updated_at | string (ISO 8601) | Last update date |
Error Codes
| Code | Description |
|---|---|
401 | Unauthorized (invalid or missing key) |
500 | Internal server error |
Important Notes
- ⚠️ You will only see templates created with your public key
- ⚠️ The authentication key must be your public key, not the private key
- ⚠️ Inactive templates (
status: inactive) are also returned in the list - ℹ️ Use the returned
idvalues for future operations with templates