API Reference
Complete documentation of the Docutray REST API
API Reference
The Docutray API provides a complete set of endpoints for document processing, type management, and workflow automation.
Authentication
All API requests require authentication using an API Key in the Authorization header:
Authorization: Bearer YOUR_API_KEYYou can generate API Keys from your organization's dashboard in Account > API Keys.
Base URL
All API endpoints use the following base URLs:
| Environment | URL |
|---|---|
| Production | https://app.docutray.com |
| Staging | https://staging.docutray.com |
Available Endpoints
Navigate through the sidebar to explore all available API endpoints organized by functionality:
- Document Conversion - Convert documents to structured data
- Document Identification - Automatically identify document types
- Document Types - Manage document type schemas
- Knowledge Bases - Manage knowledge bases for RAG operations
- Steps Execution - Execute workflow steps asynchronously
Response Format
All API responses follow a consistent JSON format:
{
"success": true,
"data": { ... }
}Error responses include details about the failure:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid document type"
}
}Rate Limits
API requests are rate-limited based on your subscription plan. Contact support for custom limits.
Create Document Type
Step-by-step guide to create custom document types using the AI-powered creation wizard
Convert documents to structured data using OCR POST
Process documents and extract structured data using AI-powered OCR. **Supported file formats:** - image/jpeg (JPEG) - image/png (PNG) - image/gif (GIF) - image/bmp (BMP) - image/webp (WebP) - application/pdf (PDF) **Size limits:** - Maximum file size: 100MB - URL download timeout: 30 seconds **Request methods:** 1. **multipart/form-data**: Direct file upload 2. **application/json with base64**: Base64-encoded image 3. **application/json with URL**: Image URL for automatic download