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.

  • 401MISSING_AUTH_HEADER

    No Authorization header present.

  • 401INVALID_API_KEY

    The API key is invalid or revoked.

  • 401ACCOUNT_BLOCKED

    Account has been blocked.

  • 401NO_CREDITS_LEFT

    No email credits remaining.

  • 401DOMAIN_NOT_VALIDATED

    Sender domain not verified.

  • 401LISTED_SPAM_HAUS

    Sender domain is listed on Spamhaus.

  • 401ISP_DOMAIN_BLOCKED

    Sending from well-known domains (gmail.com, outlook.com, etc) is not allowed.

  • 401FROM_HEADER_DOMAIN_MISMATCH

    From header domain not authorized for this sender.

  • 401USER_NOT_FOUND

    User not found.

  • 401MISSING_USER_PRIVILEGES

    Missing user privileges.

  • 401EMAIL_CREDITS_NOT_FOUND

    Error fetching email credits.

  • 429CREDENTIAL_TEMPORARILY_BLOCKED

    API key temporarily blocked due to repeated policy violations.

  • 429IP_TEMPORARILY_BLOCKED

    Requesting IP temporarily blocked due to repeated policy violations.

  • 400MISSING_FROM

    The from field is missing or empty.

  • 400INVALID_FROM_FORMAT

    The from field must be a valid email address.

  • 400MISSING_SENDERNAME

    The senderName field is missing or empty.

  • 400INVALID_SENDERNAME_FORMAT

    The senderName field contains invalid characters.

  • 400MISSING_SUBJECT

    The subject field is missing or empty.

  • 400MISSING_BODY

    The body field is missing or empty.

  • 400MISSING_TOADDRESS

    The to field is missing or empty.

  • 400MISSING_TO

    The to field is missing or empty.

  • 400INVALID_TOADDRESS

    One or more recipient addresses are malformed.

  • 400TOADDRESS_LIMIT_EXCEEDED

    More than 50 recipients in the to array.

  • 400INVALID_SCHEDULED_AT

    scheduled_at is not a valid date or is in the past.

  • 400INVALID_SENDER_FORMAT

    The sender email format is invalid.

  • 400HEADER_NOT_ALLOWED

    Custom header key is not on the allowed list (List-Unsubscribe, List-Id, X-*, etc).

  • 400INVALID_HEADER_VALUE

    Header value contains invalid characters (CR/LF not allowed).

  • 400DANGEROUS_ATTACHMENT

    One or more attachments were blocked for security reasons.

  • 403ACCOUNT_RESTRICTED

    Account is temporarily restricted.

  • 403DAILY_LIMIT

    Daily email sending limit reached.

  • 403SPAM_DETECTED

    Email content flagged as spam. Response includes quarantine_id and release instructions.

  • 403SENDER_NAME_MISMATCH

    Multiple sender names detected for same address.

  • 403FOLLOWUP_PATTERN_DETECTED

    Email content flagged as repeated suspicious follow-up pattern.

  • 403SCAM_PATTERN_DETECTED

    Email content flagged as scam pattern.

  • 403ACCOUNT_SUSPENDED_SPOOFING

    Account suspended due to repeated From header spoofing attempts.

  • 500INTERNAL_SERVER_ERROR

    Unexpected server error. Try again.

  • 500PARSE_ERROR

    Failed to process email content (MIME parse failure).

  • 500PERSIST_FAILED

    Failed 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.

  • 400INVALID_JSON

    The body is not {"commands":[...]} or has more than 20 commands.

  • 401MISSING_AUTH_HEADER

    No Authorization header was sent.

  • 401INVALID_TOKEN

    The token is malformed, unknown or revoked.

  • 401TOKEN_EXPIRED

    The access token has expired. Call Refresh Token and repeat the request.

  • 401INVALID_REFRESH_TOKEN

    The refresh token is invalid, expired, revoked or already used. Generate a new token in the dashboard.

  • 429RATE_LIMITED

    More than 15 requests/s or 15 in flight for the same IP + mailbox. Wait the number of seconds in Retry-After.

  • 503AUTH_UNAVAILABLE

    Authentication 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.

  • CMDINVALID_ARGS

    A required argument is missing or invalid.

  • CMDUNKNOWN_COMMAND

    The command name does not exist.

  • CMDNOT_FOUND

    The message, thread or folder does not exist for this token.

  • CMDINVALID_CURSOR

    The cursor is malformed or belongs to another account or folder.

  • CMDALREADY_EXISTS

    A folder with this name already exists.

  • CMDNOT_IN_TRASH

    delete only works on messages in Trash or Spam. Use move to send a message to Trash first.

  • CMDSENDER_NOT_FOUND

    The sender behind the token is not registered.

  • CMDSENDER_NO_DOMAIN

    The sender behind the token has no domain.

  • CMDNO_CREDITS

    The account has no email credits left.

  • CMDNO_RECIPIENT

    The conversation has no recipient to reply to.

  • CMDINTERNAL

    Server error. The detail is only written to the server log.