REST API v2
Response format

Response format

All API responses follow a consistent envelope structure.

Success response

{
  "success": true,
  "data": [],
  "meta": {
    "count": 25,
    "pagination": {
      "hasNext": true,
      "hasPre": false,
      "total": 1250,
      "totalPage": 63
    }
  },
  "timestamp": "2023-07-28T07:27:54.123Z",
  "message": "Operation completed successfully"
}
FieldTypeWhen present
successbooleanAlways (true)
dataobject or arrayAlways
meta.countnumberList responses
meta.paginationobjectPaginated responses
meta.pagination.hasNext, meta.pagination.hasPrebooleanPaginated responses
meta.pagination.total, meta.pagination.totalPagenumberPaginated responses, when you send hasCount=true
timestampstring (ISO 8601)Always
messagestringOptional

Error response

{
  "success": false,
  "error": {
    "message": "Resource not found",
    "code": "NOT_FOUND",
    "statusCode": 404,
    "details": {}
  },
  "timestamp": "2023-07-28T07:27:54.123Z"
}
FieldTypeWhen present
successbooleanAlways (false)
error.messagestringAlways
error.codestringAlways
error.statusCodenumberAlways
error.detailsobjectOptional
timestampstring (ISO 8601)Always

Plan and rate-limit errors (HTTP 402 and 429) use a flat body instead. See Errors.

Data filtering

API responses only include fields with actual data. Fields with null or undefined values are automatically filtered out to provide cleaner responses for customer-facing applications.