Forms / IRS
Generate Form 940 programmatically
Form 940 — Employer's Annual Federal Unemployment (FUTA) Tax Return. Official IRS PDF, 3 pages, 97 fields read automatically.
The 940 is the 941's annual sibling: every employer, once a year, all at the same time. For a payroll platform that means a January spike of documents whose every number the system already computed — the only question is whether a person retypes them onto the IRS's three pages or a POST does.
What you send
Real field names, straight from the PDF — the excerpt shows the first 5 of 97. The full list is in the table below, and the template hands you the complete JSON schema to copy.
{
"data": {
"topmostSubform[0].Page1[0].EntityArea[0].f1_1[0]": "string",
"topmostSubform[0].Page1[0].EntityArea[0].f1_2[0]": "string",
"topmostSubform[0].Page1[0].EntityArea[0].f1_3[0]": "string",
"topmostSubform[0].Page1[0].EntityArea[0].f1_4[0]": "string",
"topmostSubform[0].Page1[0].EntityArea[0].f1_5[0]": "string"
}
}
// …plus 92 more fields, all listed belowWhat you get back
The completed Form 940, streamed back as the response — or delivered to your webhook, HMAC-signed.
curl -X POST https://www.doc2api.co/api/v1/templates/<ID>/fill \ -H "X-Api-Key: d2a_live_…" \ -H "Content-Type: application/json" \ -d @payload.json -o filled.pdf # → the completed Form 940 as a PDF. # With a webhook configured, the reply is JSON and the # document arrives at your endpoint as a signed URL.
Or skip the mapping entirely: embed the actual form on your site and let the person it belongs to fill and sign it — you receive the values as JSON and the finished PDF.
Every field on Form 940
Extracted automatically from the official PDF — this table is generated by the same code that reads your uploads. In the editor, each of these is highlighted on the page itself, so you never map a name blind.
| Field name | Type | Notes |
|---|---|---|
| topmostSubform[0].Page1[0].EntityArea[0].f1_1[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].EntityArea[0].f1_2[0] | text | max 7 chars |
| topmostSubform[0].Page1[0].EntityArea[0].f1_3[0] | text | |
| topmostSubform[0].Page1[0].EntityArea[0].f1_4[0] | text | |
| topmostSubform[0].Page1[0].EntityArea[0].f1_5[0] | text | |
| topmostSubform[0].Page1[0].EntityArea[0].f1_6[0] | text | |
| topmostSubform[0].Page1[0].EntityArea[0].f1_7[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].EntityArea[0].f1_8[0] | text | max 10 chars |
| topmostSubform[0].Page1[0].EntityArea[0].f1_9[0] | text | |
| topmostSubform[0].Page1[0].EntityArea[0].f1_10[0] | text | |
| topmostSubform[0].Page1[0].EntityArea[0].f1_11[0] | text | |
| topmostSubform[0].Page1[0].TypeReturn[0].c1_1[0] | checkbox | |
| topmostSubform[0].Page1[0].TypeReturn[0].c1_2[0] | checkbox | |
| topmostSubform[0].Page1[0].TypeReturn[0].c1_3[0] | checkbox | |
| topmostSubform[0].Page1[0].TypeReturn[0].c1_4[0] | checkbox | |
| topmostSubform[0].Page1[0].AggregateReturn[0].c1_5[0] | checkbox | |
| topmostSubform[0].Page1[0].AggregateReturn[0].c1_5[1] | checkbox | |
| topmostSubform[0].Page1[0].AggregateReturn[0].c1_5[2] | checkbox | |
| topmostSubform[0].Page1[0].f1_12[0] | text | max 1 char |
| topmostSubform[0].Page1[0].f1_13[0] | text | max 1 char |
| topmostSubform[0].Page1[0].c1_6[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_7[0] | checkbox | |
| topmostSubform[0].Page1[0].f1_14[0] | text | |
| topmostSubform[0].Page1[0].f1_15[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_16[0] | text | |
| topmostSubform[0].Page1[0].f1_17[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].Checkboxes4a-b[0].c1_8[0] | checkbox | |
| topmostSubform[0].Page1[0].Checkboxes4a-b[0].c1_9[0] | checkbox | |
| topmostSubform[0].Page1[0].Checkboxes4c-d[0].c1_10[0] | checkbox | |
| topmostSubform[0].Page1[0].Checkboxes4c-d[0].c1_11[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_12[0] | checkbox | |
| topmostSubform[0].Page1[0].f1_18[0] | text | |
| topmostSubform[0].Page1[0].f1_19[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_20[0] | text | |
| topmostSubform[0].Page1[0].f1_21[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_22[0] | text | |
| topmostSubform[0].Page1[0].f1_23[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_24[0] | text | |
| topmostSubform[0].Page1[0].f1_25[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_26[0] | text | |
| topmostSubform[0].Page1[0].f1_27[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_28[0] | text | |
| topmostSubform[0].Page1[0].f1_29[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_30[0] | text | |
| topmostSubform[0].Page1[0].f1_31[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_32[0] | text | |
| topmostSubform[0].Page1[0].f1_33[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_34[0] | text | |
| topmostSubform[0].Page1[0].f1_35[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].f1_36[0] | text | |
| topmostSubform[0].Page1[0].f1_37[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].RoutingNo[0].f1_40[0] | text | max 9 chars |
| topmostSubform[0].Page1[0].c1_14[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_14[1] | checkbox | |
| topmostSubform[0].Page1[0].AccountNo[0].f1_41[0] | text | max 17 chars |
| topmostSubform[0].Page1[0].f1_48[0] | text | |
| topmostSubform[0].Page1[0].f1_49[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].c1_2[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_2[1] | checkbox | |
| topmostSubform[0].Page2[0].f1_3[0] | text | |
| topmostSubform[0].Page2[0].f1_1[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].f1_2[0] | text | max 7 chars |
| topmostSubform[0].Page2[0].f2_1[0] | text | |
| topmostSubform[0].Page2[0].f2_2[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].f2_3[0] | text | |
| topmostSubform[0].Page2[0].f2_4[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].f2_5[0] | text | |
| topmostSubform[0].Page2[0].f2_6[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].f2_7[0] | text | |
| topmostSubform[0].Page2[0].f2_8[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].f2_9[0] | text | |
| topmostSubform[0].Page2[0].f2_10[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].c2_1[0] | checkbox | |
| topmostSubform[0].Page2[0].f2_11[0] | text | |
| topmostSubform[0].Page2[0].f2_12[0] | text | |
| topmostSubform[0].Page2[0].f2_13[0] | text | max 5 chars |
| topmostSubform[0].Page2[0].c2_1[1] | checkbox | |
| topmostSubform[0].Page2[0].f2_14[0] | text | |
| topmostSubform[0].Page2[0].f2_15[0] | text | |
| topmostSubform[0].Page2[0].f2_16[0] | text | |
| topmostSubform[0].Page2[0].c2_2[0] | checkbox | |
| topmostSubform[0].Page2[0].f2_17[0] | text | |
| topmostSubform[0].Page2[0].f2_18[0] | text | max 11 chars |
| topmostSubform[0].Page2[0].f2_19[0] | text | |
| topmostSubform[0].Page2[0].f2_20[0] | text | max 10 chars |
| topmostSubform[0].Page2[0].f2_21[0] | text | |
| topmostSubform[0].Page2[0].f2_22[0] | text | |
| topmostSubform[0].Page2[0].f2_23[0] | text | |
| topmostSubform[0].Page2[0].f2_24[0] | text | max 2 chars |
| topmostSubform[0].Page2[0].f2_25[0] | text | max 10 chars |
| topmostSubform[0].Page3[0].Line1ReadOrder[0].f1_1[0] | text | max 2 chars |
| topmostSubform[0].Page3[0].Line1ReadOrder[0].f1_2[0] | text | max 7 chars |
| topmostSubform[0].Page3[0].f3_1[0] | text | |
| topmostSubform[0].Page3[0].f3_2[0] | text | max 3 chars |
| topmostSubform[0].Page3[0].f1_3[0] | text | |
| topmostSubform[0].Page3[0].f3_4[0] | text | |
| topmostSubform[0].Page3[0].f3_5[0] | text |
The parts that change every year
The 940's layout is stable but its edges move annually — credit-reduction states come and go, and the year on the form changes. A new revision is a re-upload: the IRS keeps its field names between years more often than not, so the payload usually survives, and the schema on the new template tells you immediately when it doesn't.
Questions people ask
- Can I generate one per client in a single run?
- Yes — the batch endpoint takes an array of payloads or a CSV, one row per employer, and returns one completed 940 each.
- Is this a filing?
- It's the completed form as a PDF — for paper filing, client review, or records. E-filing goes through the IRS e-file system, which is a transmission format rather than a PDF.
See your Form 940 pipeline working in the next five minutes
The button uploads the official PDF into the editor as a live template with an API key — no account, nothing to cancel. Trial documents are watermarked and kept for 24 hours; sign up to keep your work.
Doc2api is not affiliated with the Internal Revenue Service. Form 940 is a public government work; the copy here is the official revision, refreshed from irs.gov. Nothing on this page is tax or legal advice — how a completed form may be signed, filed or retained is defined by the issuing agency.
Weighing this against another tool
Each comparison opens with where the other product is the better choice, because you are going to make the comparison anyway.
- Doc2api vs DocSpring
A PDF-filling API. You upload a PDF, map its fields in their editor, and POST data to generate a filled document.
- Doc2api vs Anvil
A document-workflow platform: PDF filling, multi-step workflows, and Etch e-signature packets, with a dashboard as well as an API.
- Doc2api vs PDFMonkey
A PDF generator built around templates you design in HTML, CSS and Liquid, rendered to PDF from JSON you post.
- Doc2api vs Documint
A document generator with its own drag-and-drop template designer, driven by an API or by integrations.
- Doc2api vs Formstack Documents
Document generation inside the wider Formstack suite, alongside their forms and e-signature products.
- Doc2api vs Api2Pdf
A pay-as-you-go rendering API. You send HTML or a URL and it returns a PDF, billed on bandwidth and compute rather than per document.
Documents you design, rather than ones you were handed
Form 940 is a PDF the IRS laid out, and the API reproduces it exactly. The same account builds documents from nothing — these are the ones that tend to come up alongside it.
- Mail-merge letters into PDFs
Offer letters and payroll notices: one per employee, from the row you already have.
- Generate certificates as PDFs
Training and compliance certificates, issued per person rather than filed per year.