https://api.formepdf.com
All /v1/* endpoints require an API key passed as a Bearer token:
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)
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
202 Accepted
Webhook payload
When the job completes, Forme POSTs to yourwebhookUrl:
Poll Job Status
GET /v1/jobs/:jobId
Check the status of an async render job.
status values: pending, processing, complete, failed.
S3 Upload
Pass ans3 object in the sync render body to upload the PDF directly to your S3-compatible bucket instead of returning the bytes.
200 OK
| Field | Required | Description |
|---|---|---|
bucket | Yes | S3 bucket name |
key | Yes | Object key (path) in the bucket |
accessKeyId | Yes | AWS access key ID |
secretAccessKey | Yes | AWS secret access key |
region | * | AWS region (e.g. us-east-1). Required unless endpoint is set. |
endpoint | * | Custom S3-compatible endpoint URL. Required unless region is set. |
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.
200 OK
404 if no embedded data is found.
Rate Limits
- 100 requests per minute per API key
- Monthly render limits depend on your plan:
| Plan | Monthly renders | Templates |
|---|---|---|
| Free | 500 | 3 |
| Pro | 5,000 | Unlimited |
| Team | 25,000 | Unlimited |
| Business | 100,000 | Unlimited |
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:400— Invalid request (missing fields, bad S3 config)401— Missing or invalid API key404— Template or resource not found429— Rate limit or usage limit exceeded502— S3 upload failed500— Internal server error