DocuAPI Logo

See DocuAPI in Action

Watch how we transform a rental application PDF into a working API endpoint with AI-powered field mapping that accepts human-readable JSON data and returns completed forms.

Sample Data Input

This is the JSON data we'll send to our API endpoint

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phone": "555-123-4567",
  "moveInDate": "2024-02-15",
  "monthlyIncome": 5000,
  "hasPets": true,
  "emergencyContact": "Jane Doe",
  "emergencyPhone": "555-987-6543"
}
Rental Application Data

API Response

The API returns a completed PDF ready for download

Click "Run Demo" to generate a PDF

Code Examples

Here's how you can integrate PDF generation into your applications:

JavaScript / Node.js

// JavaScript Example
const response = await fetch('https://docuapi.io/api/submit/rental-app-demo', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'pk_your_api_key_here'
  },
  body: JSON.stringify({
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phone": "555-123-4567",
  "moveInDate": "2024-02-15",
  "monthlyIncome": 5000,
  "hasPets": true,
  "emergencyContact": "Jane Doe",
  "emergencyPhone": "555-987-6543"
})
});

const pdfBlob = await response.blob();
const pdfUrl = URL.createObjectURL(pdfBlob);
window.open(pdfUrl); // Opens filled PDF

cURL

curl -X POST 'https://docuapi.io/api/submit/rental-app-demo' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: pk_your_api_key_here' \
  -d '{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phone": "555-123-4567",
  "moveInDate": "2024-02-15",
  "monthlyIncome": 5000,
  "hasPets": true,
  "emergencyContact": "Jane Doe",
  "emergencyPhone": "555-987-6543"
}' \
  --output filled-form.pdf

Python

import requests
import json

url = 'https://docuapi.io/api/submit/rental-app-demo'
headers = {
    'Content-Type': 'application/json',
    'X-API-Key': 'pk_your_api_key_here'
}
data = {
  'firstName': 'John',
  'lastName': 'Doe',
  'email': 'john.doe@example.com',
  'phone': '555-123-4567',
  'moveInDate': '2024-02-15',
  'monthlyIncome': 5000,
  'hasPets': true,
  'emergencyContact': 'Jane Doe',
  'emergencyPhone': '555-987-6543'
}

response = requests.post(url, headers=headers, json=data)

with open('filled-form.pdf', 'wb') as f:
    f.write(response.content)

Why Choose DocuAPI?

AI-Powered Mapping

Upload a PDF and get human-readable field names automatically generated by AI.

Works Anywhere

REST API that works with any programming language or platform.

Production Ready

Scalable infrastructure with authentication and monitoring built-in.

Ready to Get Started?

Transform your PDF forms into APIs in under 5 minutes