Common Error Responses
The Email Service API uses standard HTTP status codes to indicate the success or failure of requests. Below are the common error responses you might encounter.
400 Bad Request
Invalid request format or missing required fields.
{
"error": "Bad Request",
"details": "EmailTo field is required"
}
401 Unauthorized
Invalid or missing client credentials.
{
"error": "Unauthorized",
"details": "Invalid ClientId or ClientSecret"
}
403 Forbidden
Client does not have permission to perform the requested operation.
{
"error": "Forbidden",
"details": "Client not authorized for this operation"
}
404 Not Found
Template or resource not found.
{
"error": "Not Found",
"details": "Template 'template-name' not found"
}
422 Unprocessable Entity
Request format is valid but contains semantic errors.
{
"error": "Unprocessable Entity",
"details": "Invalid email address format in EmailTo field"
}
500 Internal Server Error
An unexpected error occurred on the server.
{
"error": "Internal Server Error",
"details": "Failed to send email due to SMTP configuration error"
}
503 Service Unavailable
The service is temporarily unavailable.
{
"error": "Service Unavailable",
"details": "Email service is temporarily unavailable. Please try again later."
}