PDF Form Fill API reference

Base URL: https://api.justapi.tech. This API is in beta: the request shape may still change before general availability, and the changelog will say so.

MethodPathDescriptionModes
POST /v1/pdf/form-fields List the fillable fields free sync (sync: 58 s per call)
POST /v1/pdf/form-fill Fill the fields from JSON sync (sync: 58 s per call)

Request

Send source with exactly one of url, base64 or file_id. Every url passes the SSRF guard.

{
  "source": {
    "url": "https://files.example.com/application.pdf"
  },
  "options": {
    "fields": {
      "full_name": "Ana López",
      "agree": true,
      "state": "TX"
    },
    "flatten": true
  }
}

Options

Option Type Default
fields object: field name to value required
flatten boolean false
output "url" or "base64" "url"; base64 only for results up to 15 MB

Read the fields first

POST /v1/pdf/form-fields takes the same source and returns result.fields: one entry per field with name, type (text, checkbox, radio, choice or signature), value, required, read_only, options for checkboxes, radio groups and dropdowns, and the pages it appears on. It is free.

Values by field type

Field type Send
text a string or a number
checkbox true or false
radio one of its options
choice one of its options, or any string if the dropdown is editable

A name that is not in the form, or a value that does not fit its field, fails the call with invalid_request before anything is written. Nothing is charged.

Digitally signed PDFs are refused with signed_pdf (422) and not charged: changing their pages would break the signature.

Response

{
  "job_id": "job_...",
  "status": "completed",
  "result": { "url": "https://...", "expires_at": "...", "file_id": "file_...", "bytes": 48213, "content_type": "...", "filename": "..." },
  "stats": { "input_bytes": 51200, "output_bytes": 48213, "duration_ms": 640 },
  "billing": { "charged_micros": 6000, "balance_micros": 4950000 }
}

Billing and failures

$0.006 per call at the first volume tier, whatever the file size. The call is synchronous and all or nothing: an unreadable source, an encrypted PDF, a bad option or a worker failure stores nothing and charges $0.00. See pricing for the volume tiers.

Example

curl https://api.justapi.tech/v1/pdf/form-fill \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{"source":{"url":"https://files.example.com/application.pdf"},"options":{"fields":{"full_name":"Ana López","agree":true,"state":"TX"},"flatten":true}}'

The envelope, error catalog and billing rule are the same across every JustAPI service: see the API reference index and error codes.