API overview
The Imprime API has one job: turn a template plus your data into a PDF. You design templates in the editor, then call the API to generate documents at scale.
Base URL
Section titled “Base URL”https://app.imprime.io/apiOn a self-hosted instance, the base URL is <PUBLIC_APP_URL>/api — for example
https://imprime.example.com/api.
Authentication
Section titled “Authentication”Send an API key in the x-api-key header:
curl https://app.imprime.io/api/templates \ -H "x-api-key: $IMPRIME_API_KEY"Requests run as the owner of the key: you only ever see and generate your own templates.
Asking for someone else’s template returns 404, exactly as if it didn’t exist.
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
| POST | /export/{id}/pdf |
Generate a PDF from a template |
| GET | /templates |
List your templates |
| GET | /templates/{id} |
Get one template and its variables |
| GET | /health |
Health check (public) |
Conventions
Section titled “Conventions”- Request and response bodies are JSON, except the PDF export, which returns
application/pdf. - IDs are 24-character hexadecimal strings (
6ada52d12b452e53f3c518e3). - Errors share one format — see Errors.
Start here
Section titled “Start here”Export a PDFThe endpoint most integrations need — and often the only one.
TemplatesList your templates and read their variables.