Getting started
Guides and API reference for filling official Philippine government forms from data: parameters, validation, batch, webhooks and MCP.
PDFPhile fills official Philippine government forms for you. That includes BIR, SSS, PhilHealth, Pag-IBIG, GSIS, CSC and more.
You send the answers. You get back the real form as a PDF, with every answer printed in the right box. Each PDF is also sealed and digitally signed, so anyone can check it is genuine.
No code yet? Open the fill studio, pick a form and type. It is the same engine, in your browser.
What you need
- A free PDFPhile account. Create one on the account page, or from code: curl -X POST https://pdfphile.com/api/v1/account -H "Content-Type: application/json" -d '{"email":"you@example.com"}'. A new account starts on a 14-day Pro trial with 500 credits, then moves to Free (25 a month). - A way to send a web request. The examples below use curl, which comes with macOS, Linux and Windows 10 and later.
Step 1: get your API key
An API key is a password for your code. Your account page shows two of them, once, when you sign up:
Key · Starts with · Use it for; Live key · pk_live_ · Real PDFs. Each one costs a credit from your plan (see Credits).; Test key · pk_test_ · Free practice. Every PDF is stamped "TEST - NOT FOR FILING".
Keep the live key secret, like any password. Your code sends it in a header: Authorization: Bearer <your key>.
Good to know: on the Free plan and during the trial, answers are printed into the PDF as a sharp image. It looks the same on paper. Paid plans print real text you can select and search.
Step 2: find your form
Every form has an id, like bir-2307. Search by number or by name:
curl "https://pdfphile.com/api/v1/engine/forms?q=2307"
Then ask what the form needs:
curl https://pdfphile.com/api/v1/parameters/bir-2307
You get a list of parameters: one for each box on the form. Each one has a name (the key you send), the label printed on the paper, and a type such as text, date or amount. You can also browse every form in the form reference.
Step 3: check your answers
Before you make a PDF, ask PDFPhile to check your answers. A check is free. It needs no key and uses none of your quota.
curl -X POST https://pdfphile.com/api/v1/engine/check/bir-2307 \ -H "Content-Type: application/json" \ -d '{"payee_tin":"123-456-789-000","payee_name":"DELA CRUZ, JUAN"}'
If something is wrong, the answer tells you which box, what it expects, and why.
Step 4: fill the form
Send the same answers to the fill address, with your key:
curl -X POST https://pdfphile.com/api/v1/engine/fill/bir-2307 \ -H "Authorization: Bearer $PDFPHILE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"payee_tin":"123-456-789-000","payee_name":"DELA CRUZ, JUAN"}' \ -o 2307.pdf
Open 2307.pdf. That is the official form, filled in.
Tip: you can try steps 3 and 4 without a terminal in the API playground.
Step 5: let others verify it
Anyone who receives your PDF can check that PDFPhile issued it and that nobody changed it since. They drop the file on the verify page. Read more in Seals and verification.
Where to go next
- Filling a form: every option, header and error. - Form fields and types: what to send for each kind of box. - Automation and integrations: many forms at once, spreadsheets and no-code tools.