Error Codes
API error codes and their meanings.
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content (successful delete) |
| 400 | Bad Request - Invalid input |
| 401 | Unauthorized - Invalid or missing token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 409 | Conflict - Resource already exists |
| 422 | Unprocessable Entity - Validation failed |
| 429 | Too Many Requests - Rate limited |
| 500 | Internal Server Error |
Error Response Format
All errors return a consistent JSON format:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid device type",
"details": {
"field": "device_type",
"value": "invalid_type"
}
}
}