Skip to main content
Base URL: https://api.formepdf.com All /v1/* endpoints require an API key passed as a Bearer token:
Create API keys in the dashboard.

Render PDF (sync)

POST /v1/render/:slug Renders a PDF from a template and returns the file directly. Path params: slug — your template’s URL slug. Body: JSON object passed as template data. All fields are forwarded to your JSX template function. Optional fields:
  • s3 — upload the PDF to your S3 bucket instead of returning bytes (see S3 Upload below)
  • saveboolean, default true. Every render is auto-saved to your Documents with source: "generated". Set false to skip saving.
  • saveNamestring, optional custom document name. Default: {slug}-{YYYY-MM-DD} (e.g. invoice-2026-04-03).
  • metadataobject, optional developer-defined key-value pairs stored on the saved document. Useful for tagging renders with your own identifiers (customer ID, department, environment, etc.). See Metadata below.
Response: 200 OK with Content-Type: application/pdf body.

Render PDF (async)

POST /v1/render/:slug/async Queues a render job and returns immediately. Use this for large documents or when you don’t need the PDF inline. Body: Same as sync, plus:
  • webhookUrl (optional) — URL to POST the result to when rendering completes
Response: 202 Accepted

Webhook payload

When the job completes, Forme POSTs to your webhookUrl:
On failure:

Poll Job Status

GET /v1/jobs/:jobId Check the status of an async render job.
Response:
Possible status values: pending, processing, complete, failed.

S3 Upload

Pass an s3 object in the sync render body to upload the PDF directly to your S3-compatible bucket instead of returning the bytes.
Response: 200 OK
S3 config fields: Works with any S3-compatible service (AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces).

Extract Embedded Data

POST /v1/extract Extract embedded JSON data from a PDF that was rendered with embedData. Send the raw PDF bytes as the request body with Content-Type: application/pdf.
Response: 200 OK
Returns 404 if no embedded data is found.

Flatten Forms

POST /v1/render/:slug?flattenForms=true Render a PDF with all form fields flattened — interactive fields are converted to static content. Useful for filling a form template with data and sending a non-editable PDF. Pass flattenForms=true as a query parameter on any render endpoint (sync or async).

Metadata

Tag rendered documents with your own key-value pairs for organization and retrieval.

Adding metadata

Pass a metadata object in the render request body:
Metadata is merged into the document record alongside system fields (renderTimeMs, templateSlug).

Filtering by metadata

Query saved documents by metadata values:
Multiple filters are ANDed together (maximum 5 per request):

Limits


Resources

List and retrieve your templates, documents, redaction templates, and certificates programmatically. All resource endpoints return paginated responses:
Pagination query params (all endpoints):

List Templates

GET /v1/templates Returns your templates (without JSX source or sample data). Query params: search — filter by name or slug.
Response item:

Get Template

GET /v1/templates/:slug
Response: { "data": { ... } } with the same fields as the list item.

List Documents

GET /v1/documents Returns your rendered documents with metadata. Query params:
Response item:

Get Document

GET /v1/documents/:id Returns a single document with a presigned download URL (1-hour expiry).
Response: { "data": { ...document, "downloadUrl": "https://..." } }

List Redaction Templates

GET /v1/redaction-templates Query params: search — filter by name or slug.
Response item:

Get Redaction Template

GET /v1/redaction-templates/:slug
Response: { "data": { ... } } with the same fields as the list item.

List Certificates

GET /v1/certificates Returns your uploaded signing certificates (without PEM data).
Response item:
Resource listing endpoints require the hosted API (Team plan or above). Self-hosted users should manage resources through their own database.

Rate Limits

  • 100 requests per minute per API key
  • Monthly render limits depend on your plan:
When you hit a rate limit, the API returns 429 Too Many Requests. When you exceed your monthly render quota, it returns 429 with a message to upgrade.

Error Format

All errors return JSON:
Common HTTP status codes:
  • 400 — Invalid request (missing fields, bad S3 config)
  • 401 — Missing or invalid API key
  • 404 — Template or resource not found
  • 429 — Rate limit or usage limit exceeded
  • 502 — S3 upload failed
  • 500 — Internal server error