API Reference
The LedgerOS API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.Base URL
Authentication
All endpoints require authentication via theApi-Key header:
Request Format
- All request bodies must be JSON-encoded
- Include
Content-Type: application/jsonheader for POST/PATCH requests
Response Format
All responses are JSON-encoded with the following structure: Success:HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Access denied |
404 | Not Found - Resource doesn’t exist |
429 | Too Many Requests - Rate limited |
500 | Server Error |
Pagination
List endpoints support cursor-based pagination:| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Items per page (max 100) |
cursor | string | - | Cursor from previous response |
Idempotency
For POST requests, you can include anIdempotency-Key header to safely retry requests: