API reference
Four lines in the language you already use.
One key, one endpoint for a single render, one for a batch. Everything below is the whole surface area.
Authentication
Pass your key as a bearer token on every request. Keys are scoped per environment — a live key never touches test data and a test key never bills your plan.
curl -X POST https://api.pagemint.dev/v1/render \
-H "Authorization: Bearer $PAGEMINT_KEY" \
-H "Content-Type: application/json"Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /v1/render | Render one document from a template and data. |
| POST | /v1/render/batch | Queue up to 1,000 documents from an array of data objects. |
| GET | /v1/render/:id | Check the status of a queued or batch render. |
| GET | /v1/templates | List templates available on your account. |
| POST | /v1/templates | Create or update a stored template. |
Errors
Errors are plain JSON: { "error": { "code", "message", "field" } }.
| Status | Meaning |
|---|---|
| 400 | Malformed request — check the response body for the field that failed. |
| 401 | Missing or invalid API key. |
| 402 | Plan volume exceeded and no overage rate is set. |
| 422 | Template resolved, but a required merge field was missing. |
| 500 | Render failed on our side. Safe to retry — retries are never billed. |
Rate limits
Concurrency is per key, not per account — raise it from the dashboard as your batch jobs need more headroom. Every response carriesX-RateLimit-Remainingso you can back off before you're throttled instead of after.