Skip to main content
The GoSentrix API uses standard HTTP status codes and returns detailed error information.

HTTP Status Codes

CodeMeaning
200Success
201Created
204No Content
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
422Unprocessable Entity
429Too Many Requests
500Internal Server Error

Error Response Format

All errors follow this format:
{
  "error": {
    "code": "invalid_request",
    "message": "The request is invalid",
    "details": {
      "field": "email",
      "reason": "Invalid email format"
    }
  }
}

Common Error Codes

See Error Codes Reference for a complete list.

Rate Limiting Errors

When rate limited, the response includes retry information:
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Too many requests",
    "retry_after": 60
  }
}

Best Practices

  • Always check HTTP status codes
  • Parse error responses for user-friendly messages
  • Implement exponential backoff for retries
  • Log errors for debugging
  • Handle rate limits gracefully