Skip to content
ParseFlow

Authentication

Every API request to ParseFlow requires authentication via an API key. This guide covers how to create, use, rotate, and secure your keys.

Getting Your API Key

  1. 1Sign up or log in at the Dashboard.
  2. 2Click + New Key and give it a descriptive name (e.g., “Production”, “Staging”).
  3. 3Copy the key immediately. It is shown only once and cannot be retrieved later.

You can also create API keys programmatically via the POST /api/auth/register endpoint.

Using Your API Key

Include your key in every request using one of these methods:

Method 1: X-API-Key Header (Recommended)

curl -X POST https://parseflow.dev/api/v1/extract \
  -H "X-API-Key: dm_live_your_api_key_here" \
  -F "file=@invoice.pdf"

Method 2: Authorization Bearer

curl -X POST https://parseflow.dev/api/v1/extract \
  -H "Authorization: Bearer dm_live_your_api_key_here" \
  -F "file=@invoice.pdf"

Python Example

import requests

response = requests.post(
    "https://parseflow.dev/api/v1/extract",
    headers={"X-API-Key": "dm_live_your_api_key_here"},
    files={"file": open("invoice.pdf", "rb")},
    data={"document_type": "invoice"}
)

print(response.json())

Node.js Example

const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');

const form = new FormData();
form.append('file', fs.createReadStream('invoice.pdf'));
form.append('document_type', 'invoice');

const response = await axios.post(
  'https://parseflow.dev/api/v1/extract',
  form,
  {
    headers: {
      'X-API-Key': 'dm_live_your_api_key_here',
      ...form.getHeaders()
    }
  }
);

console.log(response.data);

Go Example

req, _ := http.NewRequest("POST",
    "https://parseflow.dev/api/v1/extract", body)
req.Header.Set("X-API-Key", "dm_live_your_api_key_here")
req.Header.Set("Content-Type", writer.FormDataContentType())

resp, _ := http.DefaultClient.Do(req)

Key Formats

All ParseFlow API keys follow a consistent format:

PrefixEnvironmentExample
dm_live_Productiondm_live_a1b2c3d4e5f6...
dm_test_Testing (coming soon)dm_test_a1b2c3d4e5f6...

Keys are 56 characters long: 8-character prefix + 48 random hex characters.

Security Best Practices

  • Never expose keys in client-side code. Always call the API from your backend.
  • Use environment variables to store keys. Never commit them to version control.
  • Use separate keys for different environments (production, staging, development).
  • Revoke compromised keys immediately from the dashboard.
  • Rotate keys periodically — we recommend every 90 days.

Key Rotation

To rotate a key without downtime:

  1. Create a new API key from the dashboard
  2. Update your application to use the new key
  3. Deploy the change and verify it works
  4. Revoke the old key from the dashboard

Both keys will work simultaneously during the transition, so there is no downtime.

Rate Limits by Plan

PlanRequests/minDocuments/monthMax File Size
Free601005 MB
Starter601,00020 MB
Pro6010,00050 MB
Enterprise120100,000100 MB

Error Responses

Authentication-related errors:

StatusCodeDescription
401AUTH_MISSINGNo API key provided. Include X-API-Key or Authorization header.
401AUTH_INVALIDAPI key is invalid, expired, or has been revoked.
429RATE_LIMITEDToo many requests per minute. Check the Retry-After header.
429QUOTA_EXCEEDEDMonthly document limit reached. Upgrade your plan.

Example Error Response

{
  "error": "Missing API key. Include X-API-Key header.",
  "code": "AUTH_MISSING"
}

We use cookies to improve your experience and analyze site traffic. See our Privacy Policy for details.