API Documentation

RESTful API for document processing. Bank statements, Emirates ID, trade licenses, fraud detection, and more.

Try Demo

Quick Start

Get started with the PaperWork API in minutes.

1

Get API Key

Contact us to get your API key. Keys start with sk-paperwork-

2

Add Authorization

Include your key in the Authorization header as a Bearer token.

3

Make Requests

Send documents via multipart/form-data or JSON depending on endpoint.

Base URL

https://api.paperwork.to/api/v1

Authentication

All requests require a Bearer token in the Authorization header.

Authorization: Bearer sk-paperwork-YOUR_API_KEY

Endpoints

Available API endpoints for document processing.

POST/api/v1/bank-statement/analyze

Bank Statement Analysis

Extract transactions, balances, and metadata from UAE bank statements.

Request

curl -X POST https://api.paperwork.to/api/v1/bank-statement/analyze \
  -H "Authorization: Bearer sk-paperwork-YOUR_API_KEY" \
  -F "file=@statement.pdf" \
  -F "include_categories=true"

Request Parameters

ParameterTypeRequiredDescription
filefile (PDF)YesBank statement PDF file
bank_hintstringNoBank name hint for better parsing (e.g., "ENBD", "FAB")
include_categoriesbooleanNoInclude AI-powered transaction categories

Response

{
  "account_holder": "John Smith",
  "account_number": "****1234",
  "bank_name": "Emirates NBD",
  "currency": "AED",
  "period": {
    "start_date": "2024-01-01",
    "end_date": "2024-01-31"
  },
  "opening_balance": 15000.00,
  "closing_balance": 18500.00,
  "transactions": [
    {
      "date": "2024-01-05",
      "description": "SALARY TRANSFER",
      "amount": 25000.00,
      "type": "credit",
      "balance": 40000.00,
      "category": "income"
    }
  ],
  "summary": {
    "total_credits": 25000.00,
    "total_debits": 21500.00,
    "transaction_count": 45
  }
}

Response Fields

FieldTypeDescription
account_holderstringAccount holder name
account_numberstringMasked account number
bank_namestringDetected bank name
currencystringCurrency code (AED, USD, etc.)
periodobjectStatement period (start_date, end_date)
opening_balancenumberOpening balance
closing_balancenumberClosing balance
transactionsarrayArray of transaction objects
summaryobjectTotal credits, debits, transaction count

Error Codes

Standard HTTP status codes with detailed error messages.

CodeDescription
400Bad Request - Invalid parameters or file format
401Unauthorized - Missing or invalid API key
403Forbidden - API key lacks permission for this endpoint
404Not Found - Resource not found
413Payload Too Large - File exceeds size limit (50MB)
422Unprocessable Entity - Document could not be parsed
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Contact support

Error Response Format

{
  "error": {
    "code": "invalid_file_format",
    "message": "File must be PDF or image (JPG, PNG)",
    "details": {
      "received": "text/plain",
      "expected": ["application/pdf", "image/jpeg", "image/png"]
    }
  }
}

Rate Limits

Rate limits vary by subscription plan. Headers include usage info.

PlanRequestsConcurrentMax File Size
Starter100/day210MB
Professional1,000/day525MB
Enterprise10,000/day2050MB

Rate Limit Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1705401600

Webhooks

Receive notifications when async processing completes.

Configuration

Set your webhook URL in the dashboard. We'll send POST requests with processing results.

  • HTTPS endpoints only
  • Signature verification via X-Webhook-Signature header
  • 3 retry attempts with exponential backoff
  • 30 second timeout

Webhook Payload

{
  "event": "document.processed",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "request_id": "req_abc123",
    "status": "completed",
    "result": { ... }
  }
}

SDKs & Libraries

Official libraries for common languages. All SDKs are open source.

Python

pip install paperwork-sdkAvailable

Node.js

npm install @paperwork/sdkAvailable

Go

go get paperwork.to/sdkComing soon

PHP

composer require paperwork/sdkComing soon

Ready to integrate?

Get your API key and start processing documents today.

View Pricing