Your Handlebars/HTML templates. The dashboard uses these endpoints to drive the editor; an API token can also list/inspect documents (handy for syncing template ids into your codebase). Editing is typically done in the UI.
GET/v1/documentsAPI token or cookie
List documents
Returns the user’s documents (non-archived), most recently updated first.
Query parameters
folderIdinteger | "root"Filter by folder. Pass root to list documents not in any folder. Omit for all.
Response
{
"documents": [
{
"id": 12,
"uuid": "1d8e5d56-1a4f-4b62-8c33-2d34a64b2f00",
"name": "Invoice",
"framework": "TAILWIND",
"format": "A4",
"landscape": false,
"folderId": null,
"previewUrl": "https://files.transactional.dev/client/42/previews/12.png",
"previewUpdatedAt": "2026-05-22T13:50:00.000Z",
"createdAt": "2026-01-04T11:20:00.000Z",
"updatedAt": "2026-05-22T13:48:00.000Z",
"lastUsedViaApi": "2026-05-22T13:51:42.000Z"
}
]
} Errors
| Status | error | When |
|---|
| 400 | VALIDATION_ERROR | Request body or query did not pass validation. |
| 401 | UNAUTHORIZED | Missing or invalid credentials. |
| 404 | NOT_FOUND | Resource doesn't exist or isn't owned by you. |
| 500 | INTERNAL_ERROR | Unexpected server error. |
POST/v1/documentsAPI token or cookie
Create a document
Creates an empty template seeded with a small Hello-world body.
Request body
namestring (1–200)requiredDisplay name.
Request body example
{ "name": "Invoice" } Response
{
"id": 13,
"uuid": "f4a09e72-1d1f-4c2a-9e64-…",
"name": "Invoice",
"framework": "TAILWIND",
"format": "A4",
"landscape": false,
"body": "<!doctype html>\n<html>…</html>\n",
"fonts": [],
"variables": {},
"archived": false,
"createdAt": "2026-05-23T10:00:00.000Z",
"updatedAt": "2026-05-23T10:00:00.000Z"
} Errors
| Status | error | When |
|---|
| 400 | VALIDATION_ERROR | Request body or query did not pass validation. |
| 401 | UNAUTHORIZED | Missing or invalid credentials. |
| 404 | NOT_FOUND | Resource doesn't exist or isn't owned by you. |
| 500 | INTERNAL_ERROR | Unexpected server error. |
GET/v1/documents/{id}API token or cookie
Get a document
Full payload — body, fonts, variables, and the page settings used at render time.
Path parameters
idintegerrequiredInternal document id (not the uuid).
Response
{
"id": 12,
"uuid": "1d8e5d56-1a4f-4b62-8c33-2d34a64b2f00",
"name": "Invoice",
"body": "<section class=\"p-12\">{{customer.name}}</section>",
"framework": "TAILWIND",
"format": "A4",
"landscape": false,
"fonts": [{ "name": "Inter Tight", "variants": ["400", "600"], "master": true }],
"variables": { "customer": { "name": "Acme Corp" } },
"archived": false
} Errors
| Status | error | When |
|---|
| 400 | VALIDATION_ERROR | Request body or query did not pass validation. |
| 401 | UNAUTHORIZED | Missing or invalid credentials. |
| 404 | NOT_FOUND | Resource doesn't exist or isn't owned by you. |
| 500 | INTERNAL_ERROR | Unexpected server error. |
PATCH/v1/documents/{id}API token or cookie
Update a document
Patch any subset of fields. Changing a renderable field (body, framework, format, landscape, fonts, variables) enqueues an off-thread preview render.
Path parameters
idintegerrequiredInternal document id.
Request body
namestring (1–200)bodystringHandlebars-flavored HTML.frameworkNONE | TAILWIND | BOOTSTRAP | UIKITformatA1 … A6landscapebooleanfontsFont[]Each font: { name, variants: string[], master?: boolean }.variablesobjectSample variables used by the live preview.archivedbooleanfolderIdinteger | null
Request body example
{
"name": "Invoice — v2",
"format": "A4",
"fonts": [{ "name": "Inter Tight", "variants": ["400","600"], "master": true }]
} Response
/* The updated Document — same shape as GET /v1/documents/{id} */ Errors
| Status | error | When |
|---|
| 400 | VALIDATION_ERROR | Request body or query did not pass validation. |
| 401 | UNAUTHORIZED | Missing or invalid credentials. |
| 404 | NOT_FOUND | Resource doesn't exist or isn't owned by you. |
| 500 | INTERNAL_ERROR | Unexpected server error. |
DELETE/v1/documents/{id}API token or cookie
Delete a document
Hard delete. Returns 204 with no body.
Path parameters
idintegerrequiredInternal document id.
Response
/* 204 No Content */
Errors
| Status | error | When |
|---|
| 400 | VALIDATION_ERROR | Request body or query did not pass validation. |
| 401 | UNAUTHORIZED | Missing or invalid credentials. |
| 404 | NOT_FOUND | Resource doesn't exist or isn't owned by you. |
| 500 | INTERNAL_ERROR | Unexpected server error. |