Skip to content

Error Handling

The Emailhook API uses conventional HTTP response codes.

HTTP Status Codes

CodeDescription
200OK - Request succeeded
201Created - Resource created successfully
204No Content - Request succeeded, no content returned
400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing API key
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Server error

Error Response Format

All error responses follow the same structure:

json
{
  "error": {
    "type": "error_type",
    "message": "Human-readable error message",
    "requestId": "req_abc123"
  }
}

Built with VitePress