← Back to App Admin Dashboard

Smart Form Pilot API

Programmatically upload PDFs, detect fields, and generate editable forms.

Authentication

Include your API key in the X-API-Key header with every request.

curl -H "X-API-Key: fp_your_key_here" https://smartdocpilot.com/smartForm/documents/doc_id/fields

Get Your API Key

Sign in to the app first, then generate a key. It is shown once — store it securely.

What a key can do depends on your plan. Free account: a test key, 20 calls a day, watermarked PDFs, and Make Editable on documents up to 5 pages. Subscription: 2,000 calls a day, clean PDFs, and Make Editable up to 100 pages. Make Editable through the API counts toward the same daily limit as in the app.

Your API Keys

Sign in to see your keys.

Endpoints

Base URL https://smartdocpilot.com/smartForm. Replace DOC_ID with a document id from the upload response. Upload, generate and reprocess are rate-limited and metered against your key.

Documents

POST/documents
Upload a PDF or image and auto-detect fields. multipart/form-data with a file field. Returns the document id and field count. Add ?skip_analysis=true to store the file without running detection.
curl -X POST https://smartdocpilot.com/smartForm/documents \
  -H "X-API-Key: fp_your_key" \
  -F "file=@form.pdf"
GET/documents/{id}/fields
Get the detected field schema — every page with each field's type, bounding box and metadata.
curl https://smartdocpilot.com/smartForm/documents/DOC_ID/fields -H "X-API-Key: fp_your_key"
PUT/documents/{id}/fields
Replace the field schema. Send the full document JSON (same shape GET returns). Returns the new field count.
POST/documents/{id}/generate
Generate the editable PDF. Optional JSON body with a password; query params watermark and flatten. Returns the generated PDF path.
curl -X POST https://smartdocpilot.com/smartForm/documents/DOC_ID/generate \
  -H "X-API-Key: fp_your_key" -H "Content-Type: application/json" \
  -d '{"password": ""}'
POST/documents/{id}/generate-filled
Generate a PDF with values baked in. JSON body: {"fieldValues": {"field_id": "value"}} (optional password).
curl -X POST https://smartdocpilot.com/smartForm/documents/DOC_ID/generate-filled \
  -H "X-API-Key: fp_your_key" -H "Content-Type: application/json" \
  -d '{"fieldValues": {"p1_text_0001": "Jane Doe"}}'
POST/documents/{id}/reprocess
Re-run AI field detection on demand. Page-capped per plan (returns 402 if the document exceeds the limit).
GET/documents/{id}/download
Download the generated editable PDF (application/pdf).
GET/documents/{id}/original
Download the original uploaded file.
GET/documents/{id}/pages/{n}/image
Render a single page as a PNG preview image.

Batch

POST/batch/upload
Upload up to 20 files at once (multipart/form-data, repeated files). Detection is run later per-document via reprocess.
POST/batch/generate
Generate editable PDFs for many documents. JSON body: a list of document ids.
POST/batch/download-zip
Download several generated PDFs as a single ZIP. JSON body: a list of document ids.

API keys

POST/api-keys
Create an API key. Requires a signed-in session (X-Session header). Optional JSON {"name": "..."} to label it. The key is returned once.
GET/api-keys
List your keys: name, created, last used and call count (never the key itself). Requires the signed-in session.
GET/api-keys/validate
Check a key and see its usage count. Pass the key in X-API-Key.
DELETE/api-keys/{keyId}
Revoke a key. Requires the signed-in session.