521 B
521 B
API Response Format Standard
All API responses follow this envelope:
{
"success": true,
"data": { ... },
"error": null,
"meta": {
"page": 1,
"total": 100
}
}
- Always use
successboolean datacontains the response payload on successerrorcontains {code, message} on failuremetacontains pagination metadata when applicable
HTTP Status Codes
- 200: Success
- 201: Created
- 400: Bad request (validation error)
- 401: Unauthorized
- 404: Not found
- 500: Server error