Riferimento API

Codici di errore

Ogni codice di errore che l'API può restituire, con il suo stato HTTP e cosa fare. Send e Receive usano formati di errore diversi.

Invia email

Gli errori restituiscono un oggetto JSON con error, code e responseTime. Vedi Invia email.

  • 401MISSING_AUTH_HEADER

    Header Authorization assente.

  • 401INVALID_API_KEY

    La API key non è valida o è stata revocata.

  • 401ACCOUNT_BLOCKED

    L'account è stato bloccato.

  • 401NO_CREDITS_LEFT

    Crediti email insufficienti per tutti i destinatari. Ogni indirizzo to, cc e bcc usa 1 credito.

  • 401DOMAIN_NOT_VALIDATED

    Dominio del mittente non verificato.

  • 401LISTED_SPAM_HAUS

    Il dominio del mittente è in lista su Spamhaus.

  • 401ISP_DOMAIN_BLOCKED

    Non è consentito inviare da domini noti (gmail.com, outlook.com, ecc.).

  • 401FROM_HEADER_DOMAIN_MISMATCH

    Il dominio dell'header From non è autorizzato per questo mittente.

  • 401USER_NOT_FOUND

    Utente non trovato.

  • 401MISSING_USER_PRIVILEGES

    Privilegi utente mancanti.

  • 401EMAIL_CREDITS_NOT_FOUND

    Errore nel recupero dei crediti email.

  • 401EMAIL_NOT_VALIDATED

    L'indirizzo email dell'account non è ancora stato verificato.

  • 429CREDENTIAL_TEMPORARILY_BLOCKED

    API key bloccata temporaneamente per ripetute violazioni delle policy.

  • 429IP_TEMPORARILY_BLOCKED

    IP richiedente bloccato temporaneamente per ripetute violazioni delle policy.

  • 429TOO_MANY_CONCURRENT_CONNECTIONS

    Troppe richieste simultanee da questo IP. Riprova tra poco.

  • 400INVALID_JSON

    Il body della richiesta non è un JSON valido.

  • 400MISSING_FROM

    Il campo from manca o è vuoto.

  • 400INVALID_FROM_FORMAT

    Il campo from deve essere un indirizzo email valido.

  • 400MISSING_SENDERNAME

    Il campo senderName manca o è vuoto.

  • 400INVALID_SENDERNAME_FORMAT

    Il campo senderName contiene caratteri non validi.

  • 400MISSING_SUBJECT

    Il campo subject manca o è vuoto.

  • 400MISSING_BODY

    Il campo body manca o è vuoto.

  • 400MISSING_TOADDRESS

    Il campo to manca o è vuoto.

  • 400MISSING_TO

    Il campo to manca o è vuoto.

  • 400INVALID_TOADDRESS

    Uno o più indirizzi destinatari non sono validi.

  • 400TOADDRESS_LIMIT_EXCEEDED

    Più di 50 destinatari nell'array to.

  • 400INVALID_CCADDRESS

    Uno o più indirizzi cc non sono validi.

  • 400INVALID_BCCADDRESS

    Uno o più indirizzi bcc non sono validi.

  • 400RECIPIENT_LIMIT_EXCEEDED

    to, cc e bcc insieme hanno più di 50 destinatari unici.

  • 400INVALID_SCHEDULED_AT

    scheduled_at non è una data valida o è nel passato.

  • 400INVALID_SENDER_FORMAT

    Il formato dell'email del mittente non è valido.

  • 400HEADER_NOT_ALLOWED

    La chiave dell'header personalizzato non è nell'elenco consentito (List-Unsubscribe, List-Id, X-*, ecc.).

  • 400INVALID_HEADER_VALUE

    Il valore dell'header contiene caratteri non validi (CR/LF non ammessi).

  • 400DANGEROUS_ATTACHMENT

    Uno o più allegati sono stati bloccati per motivi di sicurezza.

  • 400INVALID_ATTACHMENT

    Il contenuto di un allegato non è base64 valido.

  • 400MISSING_UNSUBSCRIBE_PLACEHOLDER

    unsubscribe è true ma il body non ha un segnaposto di disiscrizione ([unsubscribe_url], [unsubscribe], [unsub_url] o [opt_out_url]).

  • 403ACCOUNT_RESTRICTED

    L'account è temporaneamente limitato.

  • 403DAILY_LIMIT

    Raggiunto il limite giornaliero di invio email.

  • 403MARKETING_LIMIT_REACHED

    Raggiunto il limite marketing giornaliero del piano gratuito: 30 email marketing o di cold outreach al giorno, contate per destinatario su una finestra mobile di 24 ore. La risposta include limit, used, recipients e upgradeUrl. Le email transazionali partono comunque; nulla va in coda.

  • 403FORBIDDEN_HTML_CONTENT

    L'HTML contiene contenuti attivi non consentiti nelle email (script, iframe, form, input, button, embed, object, svg, handler on*, link javascript:, meta refresh…). La risposta elenca cosa è stato trovato. Usa un <a> con stile al posto di pulsanti o form.

  • 403SPAM_DETECTED

    Contenuto dell'email segnalato come spam. La risposta include quarantine_id e le istruzioni per lo sblocco.

  • 403SENDER_NAME_MISMATCH

    Rilevati più nomi mittente per lo stesso indirizzo.

  • 403FOLLOWUP_PATTERN_DETECTED

    Contenuto dell'email segnalato come schema di follow-up sospetto ripetuto.

  • 403SCAM_PATTERN_DETECTED

    Contenuto dell'email segnalato come schema di truffa.

  • 403SHARED_DOMAIN_REQUIRES_PAID_PLAN

    Questo dominio di invio condiviso è disponibile solo nei piani a pagamento. La risposta elenca in allowedDomains i domini condivisi che puoi usare, più upgradeUrl. Usane uno o il tuo dominio verificato.

  • 403ACCOUNT_SUSPENDED_SPOOFING

    Account sospeso per ripetuti tentativi di spoofing dell'header From.

  • 400INVALID_IDEMPOTENCY_KEY

    L'header Idempotency-Key non è valido. Usa 1–255 caratteri: lettere, numeri, _ - : .

  • 409IDEMPOTENCY_IN_PROGRESS

    Una richiesta con la stessa Idempotency-Key è ancora in elaborazione. Attendi (Retry-After: 1) e riprova con la stessa chiave.

  • 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

    Questa Idempotency-Key è già stata usata con un body diverso. Usa una chiave nuova per ogni nuova email.

  • 500INTERNAL_SERVER_ERROR

    Errore imprevisto del server. Riprova.

  • 500PARSE_ERROR

    Impossibile elaborare il contenuto dell'email (errore di parsing MIME).

  • 500PERSIST_FAILED

    Impossibile mettere l'email in coda (errore di salvataggio nel database).

  • 503AUTH_UNAVAILABLE

    Impossibile verificare la API key in questo momento. Riprova.

  • 503UNSUBSCRIBE_UNAVAILABLE

    Servizio del link di disiscrizione temporaneamente non disponibile. Riprova più tardi.

Limiti del piano gratuito

Con il piano gratuito, marketing e cold outreach sono limitati a 30 email al giorno, contate per destinatario (un'email a 5 persone conta 5) su una finestra mobile di 24 ore. Le email transazionali non sono interessate. Oltre il limite la richiesta viene rifiutata e nulla va in coda: invia di nuovo quando la finestra si azzera, o passa a un piano superiore.

403MARKETING_LIMIT_REACHED

Restituito da /v3.0/send quando questa email supererebbe il limite marketing del piano gratuito. used è quanto già conteggiato nelle ultime 24 ore e recipients quanti ne aggiungerebbe questa email.

{
  "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

Restituito quando crei un mittente su un dominio condiviso disponibile solo nei piani a pagamento. allowedDomains elenca i domini condivisi che il tuo piano può usare; il tuo dominio verificato funziona sempre.

{
  "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"
}

Regole complete: Acceptable Use Policy — Piano gratuito

Receive: errori HTTP

Rifiutano l'intera richiesta. Il body è { "type": "ERROR", "code": "...", "message": "..." }. Con RATE_LIMITED, attendi i secondi indicati nell'header Retry-After.

  • 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: errori dei comandi

Tornano dentro il risultato del comando, con HTTP 200, così un comando fallito non blocca gli altri della stessa richiesta. Controlla results[].type. Vedi Esegui comandi.

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