Response Codes

Status Codes

Status CodeDescription
202Accepted: Email Request is accepted for processing
200OK: (For Sandbox mode)
400Bad Request: Invalid request data
401Unauthorized: Invalid product token
403Forbidden: Email rejected (size/content)
500Internal Server Error: Server-side error

Responses

All responses follow a consistent format:

{
  "errorCode": 1,
  "details": "Error description",
  "messageId": ""
}

Successful Response (202)

{
  "errorCode": 202,
  "details": "Email sent successfully",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

Successful Response (200)

{
  "errorCode": 200,
  "details": "Sandbox mode is enabled. This message is accepted but will not be sent",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"

Invalid Product Token (401)

{
  "errorCode": 401,
  "details": "Product token is mandatory.",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

Invalid Request (400)

{
  "errorCode": 400,
  "details": "From Address is invalid or empty",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

Recipients Limit Exceeded (400)

{
  "errorCode": 400,
  "details": "Recipients count exceeds the max allowed limit of 50",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

Email Too Large (403)

{
  "errorCode": 403,
  "details": "Email size exceeds maximum allowed size",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

Internal Server Error (500)

{
  "errorCode": 500,
  "details": "Internal server error occurred",
  "messageId": "550e8400-e29b-41d4-a716-446655440000"
}

Best Practices

  1. Priority Usage: Use "high" priority only for truly time-sensitive emails
  2. Clear Subject Lines: Make subjects descriptive and actionable
  3. Customer References: Use meaningful reference IDs for tracking and debugging
  4. Content Size: Keep total email size under 25MB including all attachments
  5. Recipient Validation: Ensure all email addresses are properly formatted