Editable templates
Current release · Updated October 2, 2026
DryKraft Editable templates reference: methods, permissions, request fields, response shapes, examples and current limits. Read authentication and error handling first.
/api/templates/List workspace templates
Access: Workspace member · Success: 200
Returns active and archived templates, up to100 entries and2 MB per workspace. Library is isolated to the authenticated workspace.
No request body is required.
Response
Template[].
curl --request GET \
--url 'https://app.drykraft.com/api/templates/' \
--cookie 'drykraft_session=<YOUR_SESSION_TOKEN>'/api/templates/{id}Read template
Access: Workspace member · Success: 200
Returns404 for foreign or missing IDs. Read-only members can inspect reusable content.
No request body is required.
Response
Use Template.
curl --request GET \
--url 'https://app.drykraft.com/api/templates/00000000-0000-4000-8000-000000000001' \
--cookie 'drykraft_session=<YOUR_SESSION_TOKEN>'/api/templates/Create reusable template
Access: Owner, admin or member · Success: 201
Supply a stable creation UUID. Identical retries return the original entry; changed content with that UUID returns409. Saved content is not sent, issued or connected to provider credentials.
JSON request
Use TemplateInput. Choose the matching kind/content schema. Unknown content fields are rejected. No credentials or recipients belong in templates.
| Field | Type | Required | Details |
|---|---|---|---|
id | uuid | Yes |
Response
Use Template.
curl --request POST \
--url 'https://app.drykraft.com/api/templates/' \
--cookie 'drykraft_session=<YOUR_SESSION_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer follow-up",
"kind": "email",
"content": {
"subject": "Hello {{record.data.name}}",
"body": "Thank you for your interest."
},
"archived": false,
"id": "00000000-0000-4000-8000-000000000001"
}'/api/templates/{id}Edit or archive template
Access: Owner, admin or member · Success: 200
Supply complete name, kind, content, archived flag and latest version. Stale edits return409. Kind cannot change. Archive is reversible; existing draft copies, issued invoices and launched campaigns remain unchanged.
JSON request
Use TemplateInput. Choose the matching kind/content schema. Unknown content fields are rejected. No credentials or recipients belong in templates.
| Field | Type | Required | Details |
|---|---|---|---|
version | integer | Yes | Positive optimistic version returned by the latest read. Refresh on 409; do not overwrite stale changes. Min 1. |
Response
Use Template.
curl --request PUT \
--url 'https://app.drykraft.com/api/templates/00000000-0000-4000-8000-000000000001' \
--cookie 'drykraft_session=<YOUR_SESSION_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Customer follow-up",
"kind": "email",
"content": {
"subject": "Hello {{record.data.name}}",
"body": "Thank you for your interest."
},
"archived": false,
"version": 1
}'/api/templates/invoice-previewPreview sample invoice PDF
Access: Workspace member · Success: 200
Validates unsaved design and downloads a sample draft PDF with fictional customer and100-unit line item in the workspace currency. No record is created, invoice issued or message sent. Current business profile is used.
JSON request
Use InvoiceTemplate. Validated plain-text document design, saved with the invoice. Supplied logo and accurate status, amounts and numbering remain protected. No HTML, remote images or scripts.
Response
binary.
curl --request POST \
--url 'https://app.drykraft.com/api/templates/invoice-preview' \
--cookie 'drykraft_session=<YOUR_SESSION_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"title": "Invoice",
"footer": "Thank you for your business.",
"accent": "#bf3d05"
}'