FOIA API Documentation

Integrate FOIA request submission and tracking into your applications

Getting Started
The FOIA API allows external applications to submit and track Freedom of Information Act requests programmatically.

Base URL

https://govcloudfoia.com/api/v1

Authentication

All API requests require an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Rate Limiting

API keys are rate-limited to 1,000 requests per hour by default. Rate limit information is included in response headers.

🧪 Sandbox Mode

API keys can be created in sandbox mode for safe testing without affecting production data.

  • Sandbox keys use pre-populated test data (5 sample FOIA requests)
  • Submissions and updates don't affect production requests
  • Perfect for development, testing, and integration work
  • Create sandbox keys from the API Keys page
POST/api/v1/requests
Submit a new FOIA request

Request Body

{
  "requesterName": "John Doe",
  "requesterEmail": "[email protected]",
  "requesterPhone": "+1-555-0123",
  "requesterOrganization": "Example Corp",
  "requesterAddress": "123 Main St, City, State 12345",
  "requestDescription": "Records related to...",
  "dateRangeStart": "2024-01-01T00:00:00Z",
  "dateRangeEnd": "2024-12-31T23:59:59Z",
  "expeditedProcessing": false,
  "feeWaiverRequested": false
}

Response (201 Created)

{
  "success": true,
  "message": "FOIA request submitted successfully",
  "data": {
    "trackingNumber": "FOIA-2026-ABC123XYZ",
    "status": "submitted",
    "dueDate": "2026-03-15T17:00:00.000Z",
    "submittedAt": "2026-02-05T02:30:00.000Z"
  }
}

Example (cURL)

curl -X POST https://govcloudfoia.com/api/v1/requests \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "requesterName": "John Doe",
    "requesterEmail": "[email protected]",
    "requestDescription": "Records related to transportation projects in 2024"
  }'

Example (JavaScript)

const response = await fetch('https://govcloudfoia.com/api/v1/requests', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    requesterName: 'John Doe',
    requesterEmail: '[email protected]',
    requestDescription: 'Records related to transportation projects in 2024'
  })
});

const data = await response.json();
console.log(data.data.trackingNumber);

Example (Python)

import requests

response = requests.post(
    'https://govcloudfoia.com/api/v1/requests',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'requesterName': 'John Doe',
        'requesterEmail': '[email protected]',
        'requestDescription': 'Records related to transportation projects in 2024'
    }
)

data = response.json()
print(data['data']['trackingNumber'])
Error Responses
Common error responses and their meanings

401 Unauthorized

{
  "error": "Unauthorized",
  "message": "Missing or invalid API key"
}

429 Rate Limit Exceeded

{
  "error": "Rate Limit Exceeded",
  "message": "Rate limit of 1000 requests per hour exceeded",
  "retryAfter": 3600
}

400 Bad Request

{
  "error": "Bad Request",
  "message": "Missing required fields: requesterName, requesterEmail, requestDescription"
}
Need an API Key?
Contact your system administrator to request an API key for your application.