Create a new stored template for the authenticated API key owner.
/api/v1/templatesHeaders
- Content-Type: application/json
- X-API-Key: df_live_...
Request
interface CreateTemplateRequest {
name: string;
description?: string;
content: string;
}Response
{
"id": "clx123",
"name": "Invoice",
"description": "Monthly invoice template",
"createdAt": "2026-04-02T10:00:00.000Z"
}cURL
curl -X POST http://localhost:3000/api/v1/templates -H "Content-Type: application/json" -H "X-API-Key: df_live_your_key" -d '{
"name": "Invoice",
"description": "Monthly invoice template",
"content": "<h1>Invoice {{invoiceNumber}}</h1>"
}'