For TypeScript/JavaScript applications, the @doclo/client SDK provides a better developer experience with type safety and automatic retries.
Base URL
/api/v1. Use HTTPS for all requests.
Authentication
Include your API key in theAuthorization header:
Request Format
All request bodies must be JSON with theContent-Type: application/json header:
Response Format
All responses are JSON. Successful responses include the requested data:Rate Limiting
API requests are rate-limited per organization. Rate limit information is included in response headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
429 Too Many Requests response. Implement exponential backoff for retries.
Credits
Document processing consumes credits based on page count and flow complexity. Credit information is included in execution responses:402 Payment Required response.
Endpoints
Flows
| Method | Endpoint | Description |
|---|---|---|
| GET | /flows | List available flows |
| GET | /flows/ | Get flow details |
| POST | /flows//run | Execute a flow |
Executions
| Method | Endpoint | Description |
|---|---|---|
| GET | /runs/ | Get execution status |
| POST | /runs//cancel | Cancel execution |
Sync vs Async Execution
By default, flow execution is asynchronous. The API returns immediately with an execution ID, and you poll for results:wait: true:
Webhooks
Instead of polling, configure a webhook to receive results:X-Doclo-Signature header using HMAC-SHA256. See Webhooks for implementation details.
Idempotency
Include anidempotencyKey to safely retry requests: