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

    Not enough email credits for every recipient. Each to, cc and bcc address uses 1 credit.

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

  • 401EMAIL_NOT_VALIDATED

    Account email address has not been verified yet.

  • 429CREDENTIAL_TEMPORARILY_BLOCKED

    API key temporarily blocked due to repeated policy violations.

  • 429IP_TEMPORARILY_BLOCKED

    Requesting IP temporarily blocked due to repeated policy violations.

  • 429TOO_MANY_CONCURRENT_CONNECTIONS

    Too many concurrent requests from this IP. Try again shortly.

  • 400INVALID_JSON

    The request body is not valid JSON.

  • 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_CCADDRESS

    One or more cc addresses are malformed.

  • 400INVALID_BCCADDRESS

    One or more bcc addresses are malformed.

  • 400RECIPIENT_LIMIT_EXCEEDED

    to, cc and bcc together have more than 50 unique recipients.

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

  • 400INVALID_ATTACHMENT

    An attachment content is not valid base64.

  • 400MISSING_UNSUBSCRIBE_PLACEHOLDER

    unsubscribe is true but the body has no unsubscribe placeholder ([unsubscribe_url], [unsubscribe], [unsub_url] or [opt_out_url]).

  • 403ACCOUNT_RESTRICTED

    Account is temporarily restricted.

  • 403DAILY_LIMIT

    Daily email sending limit reached.

  • 403MARKETING_LIMIT_REACHED

    Free plan daily marketing limit reached: 30 marketing or cold outreach emails per day, counted per recipient over a rolling 24-hour window. The response includes limit, used, recipients and upgradeUrl. Transactional emails still go out; nothing is queued.

  • 403FORBIDDEN_HTML_CONTENT

    The HTML contains active content not allowed in emails (script, iframe, form, input, button, embed, object, svg, on* handlers, javascript: links, meta refresh…). The response lists the findings. Use a styled <a> instead of buttons or forms.

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

  • 403SHARED_DOMAIN_REQUIRES_PAID_PLAN

    This shared sending domain is available on paid plans only. The response lists the shared domains you can use in allowedDomains, plus upgradeUrl. Use one of them or your own verified domain.

  • 403ACCOUNT_SUSPENDED_SPOOFING

    Account suspended due to repeated From header spoofing attempts.

  • 400INVALID_IDEMPOTENCY_KEY

    The Idempotency-Key header is invalid. Use 1–255 characters: letters, numbers, _ - : .

  • 409IDEMPOTENCY_IN_PROGRESS

    A request with the same Idempotency-Key is still being processed. Wait (Retry-After: 1) and retry with the same key.

  • 422RECIPIENT_UNSUBSCRIBED

    Sent with unsubscribe enabled (unsubscribe: true) to someone who already unsubscribed through the Sendcorex link. The whole request is refused and the unsubscribed array lists them. This person unsubscribed from you: remove them and send again, and do not send to them again.

  • 422IDEMPOTENCY_KEY_REUSED

    This Idempotency-Key was already used with a different body. Use a new key for every new email.

  • 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).

  • 503AUTH_UNAVAILABLE

    Could not validate the API key right now. Try again.

  • 503UNSUBSCRIBE_UNAVAILABLE

    Unsubscribe link service temporarily unavailable. Try again later.

Free plan limits

On the free plan, marketing and cold outreach are capped at 30 emails per day, counted per recipient (one email to 5 people counts as 5) over a rolling 24-hour window. Transactional emails are not affected. Over the cap the request is rejected and nothing is queued: send again when the window resets, or upgrade.

403MARKETING_LIMIT_REACHED

Returned by /v3.0/send when this email would go over the free plan marketing cap. used is what was already counted in the last 24 hours and recipients is how many this email would add.

{
  "code": "MARKETING_LIMIT_REACHED",
  "error": "Daily marketing limit reached for the free plan (30/30, 2 recipients in this email). Transactional emails still go out.",
  "limit": 30,
  "used": 30,
  "recipients": 2,
  "upgradeUrl": "https://app.sendcorex.com/dashboard/billing"
}
403SHARED_DOMAIN_REQUIRES_PAID_PLAN

Returned when you create a sender on a shared domain that is only available on paid plans. allowedDomains lists the shared domains your plan can use; your own verified domain always works.

{
  "code": "SHARED_DOMAIN_REQUIRES_PAID_PLAN",
  "error": "This shared domain is available on paid plans. Use inboxtaken.com or your own domain.",
  "allowedDomains": ["inboxtaken.com"],
  "upgradeUrl": "https://app.sendcorex.com/dashboard/billing"
}

Full rules: Acceptable Use Policy — Free plan

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 or label 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 fewer email credits than recipients (1 credit per copy).

  • CMDNO_RECIPIENT

    The conversation has no recipient to reply to.

  • CMDINVALID_RULE

    The rule is not valid. The message says which condition or action and why.

  • CMDLIMIT

    The mailbox reached the limit (100 rules, 200 templates or 100 labels).

  • CMDINVALID_TOADDRESS

    The to address is not a valid email.

  • CMDINVALID_CCADDRESS

    One of the cc addresses is not a valid email.

  • CMDINVALID_BCCADDRESS

    One of the bcc addresses is not a valid email.

  • CMDINVALID_RECIPIENT

    The recipient is missing or not a valid email.

  • CMDRECIPIENT_LIMIT_EXCEEDED

    to, cc and bcc together have more than 50 addresses.

  • CMDINVALID_ATTACHMENT

    An attachment content is not valid base64.

  • CMDFILE_BLOCKED

    A file was blocked by the security scan.

  • CMDATTACHMENTS_TOO_LARGE

    The attachments of the email add up to more than 25 MB, or the mailbox already has 500 MB of uploads waiting to be sent.

  • CMDTOO_MANY_OPEN_COMPOSES

    The mailbox has 50 emails with uploads that were not sent yet. Send them, or wait for the unused ones to be deleted after 48 hours.

  • CMDATTACHMENT_MISSING

    An uploaded attachment no longer exists (uploads not sent within 48 hours, and not used by a draft or scheduled email, are deleted). Upload it again.

  • CMDALREADY_SENT

    The compose_uid belongs to an email that was already sent.

  • CMDINVALID_TIME

    send_at is missing, less than 1 minute away or more than 1 year away.

  • CMDMISSING_SUBJECT

    A new email needs a subject.

  • CMDMISSING_TARGET

    Reply and forward need the original email, and it must still exist.

  • CMDDRAFT_NOT_FOUND

    The draft does not exist anymore: it was sent, deleted, or saved again (every save returns a new draft_id).

  • CMDNOT_SCHEDULED

    The email was already sent or canceled.

  • CMDSEND_FAILED

    The send was refused. The email is back in Drafts and the message says why.

  • CMDNO_UNSUBSCRIBE

    The email has no List-Unsubscribe header.

  • CMDRECIPIENT_UNSUBSCRIBED

    One or more recipients unsubscribed from this mailbox. `recipients` lists them: remove them or send again with `unsubscribe: false`.

  • CMDPAID_PLAN_REQUIRED

    More than one address in `to` needs a paid plan.

  • CMDTOO_MANY_RECIPIENTS

    `to` has more than 30 addresses.

  • CMDINVALID_AUDIENCE

    The audience is not valid: unknown group, a segment of another mailbox or a message this mailbox didn’t send.

  • CMDAUDIENCE_OVER_LIMIT

    The audience has more people than you can send to (up to 5,000 per email and your daily limit). `total` and `allowed` say how many.

  • CMDEMPTY_AUDIENCE

    Nobody in this audience right now.

  • CMDBEST_TIME_NEEDS_AUDIENCE

    `best_time` needs an `audience` and `mode: new`.

  • CMDREAD_ONLY_ACCESS

    The token or app has Read only access and the command writes. In the attachment upload route it is HTTP 403.

  • CMDINVALID_IDEMPOTENCY_KEY

    `idempotency_key` must have 1–255 characters: letters, numbers, `_ - : .`.

  • CMDIDEMPOTENCY_KEY_REUSED

    This `idempotency_key` was already used with different args. Use a new key for every new email.

  • CMDIDEMPOTENCY_IN_PROGRESS

    A call with the same `idempotency_key` is still running. Try again in 1 second with the same key.

  • CMDINTERNAL

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