ForHosting KIT · Documents & PDF

Fill a PDF form

Somewhere in most back offices sits a fillable PDF form that still gets completed by hand, one field at a time, because nobody wired it into the system that already holds the data. This fill PDF form API takes a PDF's existing AcroForm fields and a JSON object of values, and returns the completed document, so onboarding packets, applications and agency forms fill themselves from data you already have.

● StablePer request + per document$0.002
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The form that never got automated

Interactive PDF forms are everywhere — tax authorities publish them, insurers issue them, HR departments distribute them for onboarding — and nearly all of them already have named, fillable fields built in by whoever designed the form. Yet in practice a huge share still get filled manually, printed, or worse, recreated as a web form that has to be kept in sync with the original PDF by hand. That gap exists mostly because filling an existing form programmatically requires knowing its field structure, which is exactly the piece this endpoint handles.

How the fill works

Send the source PDF along with a JSON object mapping field names to values to POST /pdf/fill-form, and the request returns a task_id immediately since filling runs asynchronously. The engine matches each key in your JSON against the form's actual AcroForm field names and writes the corresponding value into text fields, checkboxes, radio groups and dropdowns exactly as the form defines them. Fields you don't include are simply left blank, so partial data is never a problem.

Where AcroForm fields come from

The AcroForm standard has been part of the PDF specification since the format's early days, letting a document designer place named, structured fields directly onto a page rather than relying on a person to line up handwriting inside printed boxes. That structure is why a form built decades ago in one tool can still be filled programmatically today: the field names and types are stored right inside the PDF itself, and this endpoint simply reads that structure and writes into it, rather than guessing coordinates on a flat page image.

Fitting it into a real workflow

It slots naturally wherever a system already holds structured data that needs to land on an official form: pull applicant details from a database and populate a government form, take onboarding data collected in a web form and push it into an HR PDF packet, or generate a filled insurance claim form directly from records in a claims system. Because each fill is a single JSON payload against a known field map, it's straightforward to run the same template against thousands of different records in a batch job.

Delivery and pricing

The completed PDF is delivered by a signed webhook, recommended for automated pipelines, or a signed link valid for 24 hours; source files, field data and output are deleted after the retention window and never used for training. Pricing is a flat $0.002 per request regardless of how many fields are filled, and a task that fails after its retry attempts is never charged. This endpoint is live now and ready for production traffic.

Auto-fill government or tax forms from stored data

Populate an official fillable PDF form with applicant or filer data already sitting in a database, instead of retyping it by hand into each new submission.

Turn onboarding data into a completed HR packet

Take the values a new hire entered in a web onboarding form and push them straight into the fillable fields of the company's official onboarding PDF.

Generate completed insurance claim forms

Fill a carrier's claim form directly from the structured data already stored in a claims management system, cutting a manual re-entry step out of the process.

Batch-produce personalized application forms

Run the same fillable PDF template against a list of thousands of applicant records, producing one completed, individually correct document per person.

How do I fill a PDF form using an API?

Send the PDF along with a JSON object of field names and values to POST /pdf/fill-form, which returns a task_id immediately. The completed form arrives by webhook or signed link once processing finishes.

Is the fill PDF form API free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

Does the PDF need to already have fillable fields?

Yes. This endpoint fills existing AcroForm fields defined inside the PDF; it does not create new fields on a flat, non-interactive page.

How do I know what field names to use in the JSON?

The field names are whatever was defined when the form was designed, matching the labels visible in a PDF editor's form tools; any standard AcroForm field inspector will list them.

Can it fill checkboxes and dropdowns, not just text fields?

Yes. Text fields, checkboxes, radio groups and dropdowns are all supported, each written according to how the form defines that field's type.

What happens if I leave a field out of my JSON?

It's simply left blank on the output form, so sending partial data for records with missing values causes no error.

Can I fill the same form template in bulk for many records?

Yes. Each request is an independent asynchronous task, so you can run the same PDF template against a large list of JSON payloads in parallel.

Is this endpoint live right now?

Yes, it is live and accepting production traffic today.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/pdf/fill-form

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/pdf/fill-form \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdf":"https://ejemplo.com/documento.pdf"}'
{
  "pdf": "https://ejemplo.com/documento.pdf"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.fill_form",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
max_pages200
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
413input_too_largeThe file exceeds the size limit.

Read the full KIT documentation →