Skip to main content

Check if a PDF is Flat

Endpoint

POST /v1/forms/check-flat

Description

Checks whether the uploaded PDF is flat (non-interactive) or fillable (contains AcroForm/XFA fields).
This endpoint accepts raw PDF bytes only and forwards them to Instafill’s Python processing engine.

The response contains a JSON object indicating whether the PDF is flat and may include additional diagnostic information depending on the backend.

This endpoint performs validation only — it does not modify or convert the PDF.

Accepted file typesapplication/pdf or application/octet-stream
Any other Content-Type returns 415 Unsupported Content Type.


Request

Headers

HeaderRequiredValue
Content-Typeapplication/pdf or application/octet-stream
AuthorizationBearer YOUR_API_KEY

Body

Binary contents of the PDF file.

No query parameters are supported — this endpoint strictly accepts file only.


cURL Example

curl -X POST "https://api.instafill.ai/v1/forms/check-flat" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/pdf" \
--data-binary "@document.pdf"

Response Sample

{
"is_flat": false,
"field_count": 59
}