Fill a PDF in one call
Send a PDF and values keyed by the printed labels, get back the filled PDF and a result for every field.
Use one-shot fill when you have a PDF and know what goes on it, and you do not need to keep the document in AppliFlo. Nothing is stored: the filled PDF comes back in the reply.
You need a key with the draft scope. See API keys and scopes.
Send the PDF and values
POST /api/v1/fill takes a multipart body with two fields:
| Field | What it is |
|---|---|
file | The PDF, up to 20 MB. |
values | A JSON object as a string. Keys are the labels printed on the form, values are what to write. |
curl -X POST https://appliflo.com/api/v1/fill \
-H "Authorization: Bearer $APPLIFLO_API_KEY" \
-H "Idempotency-Key: fill-lease-7731" \
-F "file=@lease-application.pdf" \
-F 'values={"Full name":"Lan Nguyen","Date of birth":"1991-04-17","Email":"lan@example.com","Title":"Ms"}'How values are matched
- A key matches a field by the label printed next to the box, such as
"Full name". - A choice question, such as a row of tick boxes, is matched by its question label. Give one option, or a list of options for a question that allows several. Name an option by its printed text or its value.
- Dates, phone numbers and similar values are changed to the form's format. Those come back as
formatted. - Labels you send that match nothing are ignored. Fields you send nothing for are left empty.
If a label is ambiguous, use the step by step flow instead: it gives you each field's id, and you fill by id.
Check the results
Look at every result before you use the PDF:
const problems = data.results.filter((r) => r.status === "overflowed" || r.status === "skipped");
const unsure = data.warnings ?? [];overflowed: the value did not fit even at the smallest size and was not written. Shorten it, or use the step by step flow and correct the field.skipped: not written.reasonisempty,invalid-format,invalid-value,unsupported-typeornot-needed(a form rule says this box is not needed).data.warnings: fields AppliFlo was unsure about. They are never guessed, so they stay empty.data.group_warnings: choice questions AppliFlo was unsure about, also left empty.
Field ids in a one-shot reply, such as field_12, only name fields within that reply. To keep a document and get it signed, upload it and send it for signature.
Limits and AI pages
Each call counts against the shared 20 calls a minute per key, together with detect, fill and send. See Rate limits.
Reading a form without built-in fillable fields uses AI pages, one per page. data.ai_pages shows what is left this month. When they run out, the call still works with built-in fillable fields only.