API Reference
Error codes
Every error code the API can return, with its HTTP status and what to do about it. Send and Receive use different error formats.
Send Email
Errors return a JSON object with error, code and responseTime. See Send Email.
- 401
MISSING_AUTH_HEADERNo Authorization header present.
- 401
INVALID_API_KEYThe API key is invalid or revoked.
- 401
ACCOUNT_BLOCKEDAccount has been blocked.
- 401
NO_CREDITS_LEFTNo email credits remaining.
- 401
DOMAIN_NOT_VALIDATEDSender domain not verified.
- 401
LISTED_SPAM_HAUSSender domain is listed on Spamhaus.
- 401
ISP_DOMAIN_BLOCKEDSending from well-known domains (gmail.com, outlook.com, etc) is not allowed.
- 401
FROM_HEADER_DOMAIN_MISMATCHFrom header domain not authorized for this sender.
- 401
USER_NOT_FOUNDUser not found.
- 401
MISSING_USER_PRIVILEGESMissing user privileges.
- 401
EMAIL_CREDITS_NOT_FOUNDError fetching email credits.
- 429
CREDENTIAL_TEMPORARILY_BLOCKEDAPI key temporarily blocked due to repeated policy violations.
- 429
IP_TEMPORARILY_BLOCKEDRequesting IP temporarily blocked due to repeated policy violations.
- 400
MISSING_FROMThe from field is missing or empty.
- 400
INVALID_FROM_FORMATThe from field must be a valid email address.
- 400
MISSING_SENDERNAMEThe senderName field is missing or empty.
- 400
INVALID_SENDERNAME_FORMATThe senderName field contains invalid characters.
- 400
MISSING_SUBJECTThe subject field is missing or empty.
- 400
MISSING_BODYThe body field is missing or empty.
- 400
MISSING_TOADDRESSThe to field is missing or empty.
- 400
MISSING_TOThe to field is missing or empty.
- 400
INVALID_TOADDRESSOne or more recipient addresses are malformed.
- 400
TOADDRESS_LIMIT_EXCEEDEDMore than 50 recipients in the to array.
- 400
INVALID_SCHEDULED_ATscheduled_at is not a valid date or is in the past.
- 400
INVALID_SENDER_FORMATThe sender email format is invalid.
- 400
HEADER_NOT_ALLOWEDCustom header key is not on the allowed list (List-Unsubscribe, List-Id, X-*, etc).
- 400
INVALID_HEADER_VALUEHeader value contains invalid characters (CR/LF not allowed).
- 400
DANGEROUS_ATTACHMENTOne or more attachments were blocked for security reasons.
- 403
ACCOUNT_RESTRICTEDAccount is temporarily restricted.
- 403
DAILY_LIMITDaily email sending limit reached.
- 403
SPAM_DETECTEDEmail content flagged as spam. Response includes quarantine_id and release instructions.
- 403
SENDER_NAME_MISMATCHMultiple sender names detected for same address.
- 403
FOLLOWUP_PATTERN_DETECTEDEmail content flagged as repeated suspicious follow-up pattern.
- 403
SCAM_PATTERN_DETECTEDEmail content flagged as scam pattern.
- 403
ACCOUNT_SUSPENDED_SPOOFINGAccount suspended due to repeated From header spoofing attempts.
- 500
INTERNAL_SERVER_ERRORUnexpected server error. Try again.
- 500
PARSE_ERRORFailed to process email content (MIME parse failure).
- 500
PERSIST_FAILEDFailed to queue email (database persistence failure).
Receive: HTTP errors
These reject the whole request. The body is { "type": "ERROR", "code": "...", "message": "..." }. On RATE_LIMITED, wait the seconds in the Retry-After header.
- 400
INVALID_JSONThe body is not {"commands":[...]} or has more than 20 commands.
- 401
MISSING_AUTH_HEADERNo Authorization header was sent.
- 401
INVALID_TOKENThe token is malformed, unknown or revoked.
- 401
TOKEN_EXPIREDThe access token has expired. Call Refresh Token and repeat the request.
- 401
INVALID_REFRESH_TOKENThe refresh token is invalid, expired, revoked or already used. Generate a new token in the dashboard.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + mailbox. Wait the number of seconds in Retry-After.
- 503
AUTH_UNAVAILABLEAuthentication is temporarily unavailable. Try again.
Receive: command errors
These come back inside the command result, with HTTP 200, so one failing command does not stop the others in the same request. Check results[].type. See Run Commands.
- CMD
INVALID_ARGSA required argument is missing or invalid.
- CMD
UNKNOWN_COMMANDThe command name does not exist.
- CMD
NOT_FOUNDThe message, thread or folder does not exist for this token.
- CMD
INVALID_CURSORThe cursor is malformed or belongs to another account or folder.
- CMD
ALREADY_EXISTSA folder with this name already exists.
- CMD
NOT_IN_TRASHdelete only works on messages in Trash or Spam. Use move to send a message to Trash first.
- CMD
SENDER_NOT_FOUNDThe sender behind the token is not registered.
- CMD
SENDER_NO_DOMAINThe sender behind the token has no domain.
- CMD
NO_CREDITSThe account has no email credits left.
- CMD
NO_RECIPIENTThe conversation has no recipient to reply to.
- CMD
INTERNALServer error. The detail is only written to the server log.