Referencia de la API
Español primero; English below.
Autenticación
Creá una clave en API (menú superior, con sesión). La clave se muestra una sola vez. Mandala en cada solicitud:
Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx
Generar un documento
POST /v1/documents con la clave (o el id) de la plantilla y
los datos. La respuesta es el PDF binario.
curl -X POST https://TU-DOMINIO/v1/documents \
-H "Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"template": "factura",
"data": {
"Cliente": "ACME S.A.",
"Fecha": "31/07/2026",
"Items": ["Primera línea", "Segunda línea"]
}
}' \
--output documento.pdf
template: la clave (slug) o el id numérico de una plantilla activa de tu workspace.data: un objetotoken → valor. Los campos lista aceptan un array de strings (o de objetos si el ítem tiene varios campos). Lo que falte queda vacío y lo cubren los defaults{{Token|así}}de la plantilla.
Respuestas
| Código | Qué pasó |
|---|---|
| 200 | El PDF. Tokens sin dato se reportan en el header X-Document-Warnings. |
| 400 | El cuerpo no es JSON válido o falta template/data bien formado. |
| 401 | Clave ausente, inválida o revocada. |
| 402 | Se alcanzó el límite de documentos del mes del plan. |
| 404 | No hay plantilla activa con esa clave/id en tu workspace. |
| 429 | Más de 60 solicitudes por minuto con la misma clave. |
API Reference (English)
Authentication
Create a key under API (top menu, signed in). The key is shown once. Send it with every request:
Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx
Generate a document
POST /v1/documents with the template key (or id) and your
data. The response body is the binary PDF.
curl -X POST https://YOUR-DOMAIN/v1/documents \
-H "Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"template": "invoice",
"data": {
"Customer": "ACME Inc.",
"Date": "2026-07-31",
"Items": ["First line", "Second line"]
}
}' \
--output document.pdf
template: the slug key or numeric id of an active template in your workspace.data: an object mappingtoken → value. List fields take an array of strings (or of objects when items have multiple fields). Missing values render empty and fall back to the template's{{Token|default}}.
Responses
| Status | Meaning |
|---|---|
| 200 | The PDF. Tokens with no data are reported in the X-Document-Warnings header. |
| 400 | Body is not valid JSON, or template/data malformed. |
| 401 | Missing, invalid or revoked key. |
| 402 | Monthly document limit for the plan was reached. |
| 404 | No active template with that key/id in your workspace. |
| 429 | More than 60 requests per minute on the same key. |