DocFila API

Build document AI into your product. REST + webhooks for scanning, OCR, e-signature, extraction, blockchain Verify, Rooms, and Pilot workflows. SDKs for JavaScript, Python, and Dart.

Quickstart

Sign and anchor a contract in 8 lines:

// JavaScript — npm install @docfila/sdk import { Docfila } from '@docfila/sdk'; const df = new Docfila({ apiKey: process.env.DOCFILA_API_KEY }); const doc = await df.documents.upload({ file: './contract.pdf' }); const sig = await df.signatures.request({ documentId: doc.id, signers: [{ email: 'client@example.com', role: 'signer' }], anchor: true // auto-anchor on Verify when complete }); console.log(sig.signUrl, sig.verifyUrl);

Endpoints

📄 Documents

POST /v1/documents upload
GET /v1/documents/:id retrieve
POST /v1/documents/:id/ocr run OCR
POST /v1/documents/:id/extract structured extraction

✍️ Signatures

POST /v1/signatures request
GET /v1/signatures/:id status
POST /v1/signatures/:id/cancel
Webhooks: signature.completed

🔒 Verify

POST /v1/verify/anchor anchor a hash
GET /v1/verify/:hash public lookup
GET /v1/verify/:hash/proof Merkle proof

🏛️ Rooms

POST /v1/rooms create
POST /v1/rooms/:id/files add file
POST /v1/rooms/:id/viewers invite
Webhooks: room.viewed, room.downloaded

🤖 Pilot

POST /v1/pilot/workflows create from prompt
POST /v1/pilot/workflows/:id/run
GET /v1/pilot/runs/:id

💬 Ask

POST /v1/ask chat with docs
POST /v1/ask/index add to corpus
Streaming responses with citations.

Authentication

Bearer token in the Authorization header. API keys scoped per workspace, with optional IP allowlist and per-endpoint rate limits. Rotate keys at any time from the developer console.

curl https://api.docfila.com/v1/documents \ -H "Authorization: Bearer sk_live_..." \ -F file=@contract.pdf

Webhooks & events

Subscribe to events on documents, signatures, rooms, runs, and verifications. Signed with HMAC-SHA256, retried with exponential backoff for 24 hours, viewable in the developer console.

SDKs

JavaScript / TypeScript

npm install @docfila/sdk — works in Node, Deno, Bun, browsers, Cloudflare Workers.

Python

pip install docfila — sync and async clients, type-hinted.

Dart / Flutter

dart pub add docfila — same SDK powering DocFila's own apps.

Anything else

The REST API is openly documented — build a client in any language. OpenAPI 3.1 spec available on request.

Ready to build?

Free dev tier: 1,000 API calls / month. Production usage starts at $0.01 per call with volume discounts.

Get an API Key