Skip to main content

API Key Authentication

Documind uses API key authentication. Every request to the API must include a valid API key in the X-API-Key header.

Creating API Keys

1

Navigate to API Keys

Access the API Keys section in your dashboard at /api-keys.
2

Create New Key

Click “Create API Key” and provide:
  • Name: Descriptive name for the key (e.g., “Production Automation”)
  • Description: Optional details about key usage
  • Scopes: Permissions for the key (read/write access)
  • Expiration: Optional expiration date
The full API key is shown only once during creation. Store it securely.
3

Store Securely

Save the API key in a secure location:
  • Environment variables
  • Secrets management service (AWS Secrets Manager, Azure Key Vault)
  • Password manager
Never commit keys to version control or share them publicly.

Request Format

Include the API key in the X-API-Key header of every request:

API Key Scopes

Control what operations each API key can perform:
For automation scripts, create keys with only the scopes they need: extractions:read and extractions:write.

Managing API Keys

List All Keys

Update API Key

Update key properties like name, scopes, or expiration:

Revoke API Key

Immediately disable an API key:
Revoked keys cannot be reactivated. You must create a new key.

Organization-Wide Keys

Create API keys that work across your entire organization:
Organization-wide keys:
  • Share credits across the organization
  • Access extractions from any team member
  • Ideal for shared automation infrastructure

Error Responses

401 Unauthorized

Missing or invalid API key:
Solution: Verify your API key is correct and included in the X-API-Key header.

403 Forbidden

API key lacks required scope:
Solution: Update the API key’s scopes or use a key with appropriate permissions.

402 Payment Required

Insufficient credits:
Solution: Purchase more credits to continue processing.

Security Best Practices

Store API keys in environment variables, not in code:
.env
Rotate API keys periodically (every 90 days recommended):
  1. Create a new API key
  2. Update your applications to use the new key
  3. Verify everything works
  4. Revoke the old key
Grant only the minimum scopes required:
  • Read-only automation: extractions:read only
  • Processing automation: extractions:read, extractions:write
  • Admin operations: All scopes
Track API key usage via the dashboard:
  • API calls per key
  • Last used timestamp
  • Unusual activity patterns

Next Steps

Quick Start Guide

Make your first authenticated API request