Skip to main content
Renders a PDF from a template and data, and returns the document bytes directly.
POST https://api.tipar.dev/generate
Synchronous: the response body is the finished PDF (application/pdf). No job, no polling.

Headers

Authorization
string
required
Bearer tipar_live_<key>. See Authentication.
Content-Type
string
required
application/json.

Body

template
object
required
The template document. Has a single key, page, describing the document. See Template basics and the full schema.
data
object
required
The data the template interpolates against. Any JSON object. Every {{path}} in the template must resolve here.
Request body
{
  "template": {
    "page": {
      "content": { "type": "text", "value": "Hello, {{name}}!", "style": { "fontSize": 24, "bold": true } }
    }
  },
  "data": { "name": "world" }
}

Response

200 OK
application/pdf
The rendered PDF, as raw bytes. There is no JSON wrapper — write the body straight to a file or stream it to your client.
curl https://api.tipar.dev/generate \
  -H "Authorization: Bearer $TIPAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json \
  --output document.pdf

Errors

StatuscodeWhen
400Malformed JSON, a missing/unknown node type, or a body that omits template.
401Missing, malformed, or revoked API key. Carries WWW-Authenticate: Bearer.
402quota.exceededPlan’s monthly document quota is reached.
413Request body exceeds 4 MB.
422template.*Template is well-formed JSON but unusable — structural error, missing data, or a render failure.
429rate_limit.exceededMore than 60 req/min (burst 120) on this key. Carries Retry-After.
Each non-2xx response is a Problem Details document. The full breakdown — including every 422 template.* code and example bodies — is on the errors page.
422 is the one to handle in template development: it means the template reached the renderer but couldn’t produce a document. The response lists every problem at once (all missing data paths, all structural errors), so you can fix them in a single pass. See Errors → 422.

Full example

A complete invoice request, in a few languages:
curl https://api.tipar.dev/generate \
  -H "Authorization: Bearer $TIPAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d @invoice-request.json \
  --output invoice.pdf
See the invoice example for a full template + data pair to drop in.