Forms / IRS
Fill Form W-7 programmatically
Form W-7 — Application for IRS Individual Taxpayer Identification Number. Official IRS PDF, 1 page, 69 fields read automatically.
Tax practices and acceptance agents serving clients without SSNs produce W-7s in batches every season, each one a transcription of intake data — names as they appear on documents, foreign addresses, visa details, the reason-for-applying checkboxes. It is exacting, repetitive work on exactly the clients whose documents least tolerate a retyping error.
What you send
Real field names, straight from the PDF — the excerpt shows the first 5 of 69. The full list is in the table below, and the template hands you the complete JSON schema to copy.
{
"data": {
"topmostSubform[0].Page1[0].c1_1[0]": true,
"topmostSubform[0].Page1[0].c1_1[1]": true,
"topmostSubform[0].Page1[0].c1_2[0]": true,
"topmostSubform[0].Page1[0].c1_3[0]": true,
"topmostSubform[0].Page1[0].c1_4[0]": true
}
}
// …plus 64 more fields, all listed belowWhat you get back
The completed Form W-7, 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 W-7 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 W-7
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].c1_1[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_1[1] | checkbox | |
| topmostSubform[0].Page1[0].c1_2[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_3[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_4[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_5[0] | checkbox | |
| topmostSubform[0].Page1[0].f1_01[0] | text | |
| topmostSubform[0].Page1[0].c1_6[0] | checkbox | |
| topmostSubform[0].Page1[0].f1_02[0] | text | |
| topmostSubform[0].Page1[0].f1_03[0] | text | |
| topmostSubform[0].Page1[0].c1_7[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_8[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_9[0] | checkbox | |
| topmostSubform[0].Page1[0].f1_04[0] | text | |
| topmostSubform[0].Page1[0].f1_05[0] | text | |
| topmostSubform[0].Page1[0].f1_06[0] | text | |
| topmostSubform[0].Page1[0].f1_07[0] | text | |
| topmostSubform[0].Page1[0].f1_08[0] | text | |
| topmostSubform[0].Page1[0].f1_09[0] | text | |
| topmostSubform[0].Page1[0].f1_10[0] | text | |
| topmostSubform[0].Page1[0].f1_11[0] | text | |
| topmostSubform[0].Page1[0].f1_12[0] | text | |
| topmostSubform[0].Page1[0].f1_13[0] | text | |
| topmostSubform[0].Page1[0].f1_14[0] | text | |
| topmostSubform[0].Page1[0].f1_15[0] | text | |
| topmostSubform[0].Page1[0].f1_16[0] | text | |
| topmostSubform[0].Page1[0].Line4_ReadOrder[0].f1_17[0] | text | max 8 chars |
| topmostSubform[0].Page1[0].f1_18[0] | text | |
| topmostSubform[0].Page1[0].f1_19[0] | text | |
| topmostSubform[0].Page1[0].c1_10[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_10[1] | checkbox | |
| topmostSubform[0].Page1[0].f1_20[0] | text | |
| topmostSubform[0].Page1[0].f1_21[0] | text | |
| topmostSubform[0].Page1[0].f1_22[0] | text | |
| topmostSubform[0].Page1[0].c1_11[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_11[1] | checkbox | |
| topmostSubform[0].Page1[0].c1_11[2] | checkbox | |
| topmostSubform[0].Page1[0].c1_11[3] | checkbox | |
| topmostSubform[0].Page1[0].f1_23[0] | text | |
| topmostSubform[0].Page1[0].Issued_ReadOrder[0].f1_24[0] | text | |
| topmostSubform[0].Page1[0].Issued_ReadOrder[0].f1_25[0] | text | |
| topmostSubform[0].Page1[0].Issued_ReadOrder[0].f1_26[0] | text | max 8 chars |
| topmostSubform[0].Page1[0].f1_27[0] | text | max 8 chars |
| topmostSubform[0].Page1[0].c1_12[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_12[1] | checkbox | |
| topmostSubform[0].Page1[0].ITIN[0].f1_28[0] | text | max 3 chars |
| topmostSubform[0].Page1[0].ITIN[0].f1_29[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].ITIN[0].f1_30[0] | text | max 4 chars |
| topmostSubform[0].Page1[0].IRSN[0].f1_31[0] | text | max 3 chars |
| topmostSubform[0].Page1[0].IRSN[0].f1_32[0] | text | max 2 chars |
| topmostSubform[0].Page1[0].IRSN[0].f1_33[0] | text | max 4 chars |
| topmostSubform[0].Page1[0].f1_34[0] | text | |
| topmostSubform[0].Page1[0].f1_35[0] | text | |
| topmostSubform[0].Page1[0].f1_36[0] | text | |
| topmostSubform[0].Page1[0].f1_37[0] | text | |
| topmostSubform[0].Page1[0].f1_38[0] | text | |
| topmostSubform[0].Page1[0].f1_39[0] | text | |
| topmostSubform[0].Page1[0].f1_40[0] | text | |
| topmostSubform[0].Page1[0].f1_41[0] | text | |
| topmostSubform[0].Page1[0].c1_13[0] | checkbox | |
| topmostSubform[0].Page1[0].c1_13[1] | checkbox | |
| topmostSubform[0].Page1[0].c1_13[2] | checkbox | |
| topmostSubform[0].Page1[0].f1_42[0] | text | |
| topmostSubform[0].Page1[0].f1_43[0] | text | |
| topmostSubform[0].Page1[0].f1_44[0] | text | |
| topmostSubform[0].Page1[0].f1_45[0] | text | |
| topmostSubform[0].Page1[0].f1_46[0] | text | max 10 chars |
| topmostSubform[0].Page1[0].f1_47[0] | text | max 11 chars |
| topmostSubform[0].Page1[0].f1_48[0] | text |
Foreign details, strict little formats
The W-7 wants its dates a particular way and its identity fields exactly as the supporting documents spell them. Per-field validation and letter-case rules run server-side before anything is printed, and prefilling from your records means the name on the form is character-for-character the name in your system — not a second typing of it.
Questions people ask
- Can a W-7 be filed electronically?
- No — it's a paper form, generally filed with the tax return it supports, through an acceptance agent, or at an IRS assistance center. The deliverable is precisely this completed PDF, which is why generating it cleanly matters.
- We're a Certifying Acceptance Agent — does batching work?
- Yes: one template, one POST (or CSV row) per applicant, and each completed form is delivered back with your client reference attached as params.
See your Form W-7 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 W-7 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.