Skip to main content

Success Response

All successful responses follow this pattern:
{
  "success": true,
  "data": {
    // Response data
  }
}

List Response

Listings include pagination metadata:
{
  "success": true,
  "data": [
    // Array of items
  ],
  "pagination": {
    "total": 100,
    "limit": 20,
    "offset": 0,
    "has_more": true
  }
}

Error Response

Errors follow a consistent pattern:
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error description",
    "details": {
      // Additional information when available
    }
  }
}

HTTP Status Codes

CodeDescription
200Success
201Created
204No Content (successful deletion)
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
429Rate Limit Exceeded
500Internal Error

Pagination

limit
integer
default:"20"
Maximum number of items to return (max: 100)
offset
integer
default:"0"
Number of items to skip

Example

GET /backend/leads?limit=50&offset=100

Filters

Most list endpoints support common filters:
Text search in relevant fields
created_after
string
Filter by creation date (ISO 8601)
created_before
string
Filter by creation date (ISO 8601)

Example

GET /backend/leads?search=john&created_after=2024-01-01T00:00:00Z