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.
- 401
MISSING_AUTH_HEADERHeader Authorization assente.
- 401
INVALID_API_KEYLa API key non è valida o è stata revocata.
- 401
ACCOUNT_BLOCKEDL'account è stato bloccato.
- 401
NO_CREDITS_LEFTCrediti email insufficienti per tutti i destinatari. Ogni indirizzo to, cc e bcc usa 1 credito.
- 401
DOMAIN_NOT_VALIDATEDDominio del mittente non verificato.
- 401
LISTED_SPAM_HAUSIl dominio del mittente è in lista su Spamhaus.
- 401
ISP_DOMAIN_BLOCKEDNon è consentito inviare da domini noti (gmail.com, outlook.com, ecc.).
- 401
FROM_HEADER_DOMAIN_MISMATCHIl dominio dell'header From non è autorizzato per questo mittente.
- 401
USER_NOT_FOUNDUtente non trovato.
- 401
MISSING_USER_PRIVILEGESPrivilegi utente mancanti.
- 401
EMAIL_CREDITS_NOT_FOUNDErrore nel recupero dei crediti email.
- 401
EMAIL_NOT_VALIDATEDL'indirizzo email dell'account non è ancora stato verificato.
- 429
CREDENTIAL_TEMPORARILY_BLOCKEDAPI key bloccata temporaneamente per ripetute violazioni delle policy.
- 429
IP_TEMPORARILY_BLOCKEDIP richiedente bloccato temporaneamente per ripetute violazioni delle policy.
- 429
TOO_MANY_CONCURRENT_CONNECTIONSTroppe richieste simultanee da questo IP. Riprova tra poco.
- 400
INVALID_JSONIl body della richiesta non è un JSON valido.
- 400
MISSING_FROMIl campo from manca o è vuoto.
- 400
INVALID_FROM_FORMATIl campo from deve essere un indirizzo email valido.
- 400
MISSING_SENDERNAMEIl campo senderName manca o è vuoto.
- 400
INVALID_SENDERNAME_FORMATIl campo senderName contiene caratteri non validi.
- 400
MISSING_SUBJECTIl campo subject manca o è vuoto.
- 400
MISSING_BODYIl campo body manca o è vuoto.
- 400
MISSING_TOADDRESSIl campo to manca o è vuoto.
- 400
MISSING_TOIl campo to manca o è vuoto.
- 400
INVALID_TOADDRESSUno o più indirizzi destinatari non sono validi.
- 400
TOADDRESS_LIMIT_EXCEEDEDPiù di 50 destinatari nell'array to.
- 400
INVALID_CCADDRESSUno o più indirizzi cc non sono validi.
- 400
INVALID_BCCADDRESSUno o più indirizzi bcc non sono validi.
- 400
RECIPIENT_LIMIT_EXCEEDEDto, cc e bcc insieme hanno più di 50 destinatari unici.
- 400
INVALID_SCHEDULED_ATscheduled_at non è una data valida o è nel passato.
- 400
INVALID_SENDER_FORMATIl formato dell'email del mittente non è valido.
- 400
HEADER_NOT_ALLOWEDLa chiave dell'header personalizzato non è nell'elenco consentito (List-Unsubscribe, List-Id, X-*, ecc.).
- 400
INVALID_HEADER_VALUEIl valore dell'header contiene caratteri non validi (CR/LF non ammessi).
- 400
DANGEROUS_ATTACHMENTUno o più allegati sono stati bloccati per motivi di sicurezza.
- 400
INVALID_ATTACHMENTIl contenuto di un allegato non è base64 valido.
- 400
MISSING_UNSUBSCRIBE_PLACEHOLDERunsubscribe è true ma il body non ha un segnaposto di disiscrizione ([unsubscribe_url], [unsubscribe], [unsub_url] o [opt_out_url]).
- 403
ACCOUNT_RESTRICTEDL'account è temporaneamente limitato.
- 403
DAILY_LIMITRaggiunto il limite giornaliero di invio email.
- 403
MARKETING_LIMIT_REACHEDRaggiunto 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.
- 403
FORBIDDEN_HTML_CONTENTL'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.
- 403
SPAM_DETECTEDContenuto dell'email segnalato come spam. La risposta include quarantine_id e le istruzioni per lo sblocco.
- 403
SENDER_NAME_MISMATCHRilevati più nomi mittente per lo stesso indirizzo.
- 403
FOLLOWUP_PATTERN_DETECTEDContenuto dell'email segnalato come schema di follow-up sospetto ripetuto.
- 403
SCAM_PATTERN_DETECTEDContenuto dell'email segnalato come schema di truffa.
- 403
SHARED_DOMAIN_REQUIRES_PAID_PLANQuesto 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.
- 403
ACCOUNT_SUSPENDED_SPOOFINGAccount sospeso per ripetuti tentativi di spoofing dell'header From.
- 400
INVALID_IDEMPOTENCY_KEYL'header Idempotency-Key non è valido. Usa 1–255 caratteri: lettere, numeri, _ - : .
- 409
IDEMPOTENCY_IN_PROGRESSUna richiesta con la stessa Idempotency-Key è ancora in elaborazione. Attendi (Retry-After: 1) e riprova con la stessa chiave.
- 422
RECIPIENT_UNSUBSCRIBEDSent 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.
- 422
IDEMPOTENCY_KEY_REUSEDQuesta Idempotency-Key è già stata usata con un body diverso. Usa una chiave nuova per ogni nuova email.
- 500
INTERNAL_SERVER_ERRORErrore imprevisto del server. Riprova.
- 500
PARSE_ERRORImpossibile elaborare il contenuto dell'email (errore di parsing MIME).
- 500
PERSIST_FAILEDImpossibile mettere l'email in coda (errore di salvataggio nel database).
- 503
AUTH_UNAVAILABLEImpossibile verificare la API key in questo momento. Riprova.
- 503
UNSUBSCRIBE_UNAVAILABLEServizio 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.
MARKETING_LIMIT_REACHEDRestituito 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"
}SHARED_DOMAIN_REQUIRES_PAID_PLANRestituito 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.
- 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: 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.
- 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 or label 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 fewer email credits than recipients (1 credit per copy).
- CMD
NO_RECIPIENTThe conversation has no recipient to reply to.
- CMD
INVALID_RULEThe rule is not valid. The message says which condition or action and why.
- CMD
LIMITThe mailbox reached the limit (100 rules, 200 templates or 100 labels).
- CMD
INVALID_TOADDRESSThe to address is not a valid email.
- CMD
INVALID_CCADDRESSOne of the cc addresses is not a valid email.
- CMD
INVALID_BCCADDRESSOne of the bcc addresses is not a valid email.
- CMD
INVALID_RECIPIENTThe recipient is missing or not a valid email.
- CMD
RECIPIENT_LIMIT_EXCEEDEDto, cc and bcc together have more than 50 addresses.
- CMD
INVALID_ATTACHMENTAn attachment content is not valid base64.
- CMD
FILE_BLOCKEDA file was blocked by the security scan.
- CMD
ATTACHMENTS_TOO_LARGEThe attachments of the email add up to more than 25 MB, or the mailbox already has 500 MB of uploads waiting to be sent.
- CMD
TOO_MANY_OPEN_COMPOSESThe 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.
- CMD
ATTACHMENT_MISSINGAn 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.
- CMD
ALREADY_SENTThe compose_uid belongs to an email that was already sent.
- CMD
INVALID_TIMEsend_at is missing, less than 1 minute away or more than 1 year away.
- CMD
MISSING_SUBJECTA new email needs a subject.
- CMD
MISSING_TARGETReply and forward need the original email, and it must still exist.
- CMD
DRAFT_NOT_FOUNDThe draft does not exist anymore: it was sent, deleted, or saved again (every save returns a new draft_id).
- CMD
NOT_SCHEDULEDThe email was already sent or canceled.
- CMD
SEND_FAILEDThe send was refused. The email is back in Drafts and the message says why.
- CMD
NO_UNSUBSCRIBEThe email has no List-Unsubscribe header.
- CMD
RECIPIENT_UNSUBSCRIBEDOne or more recipients unsubscribed from this mailbox. `recipients` lists them: remove them or send again with `unsubscribe: false`.
- CMD
PAID_PLAN_REQUIREDMore than one address in `to` needs a paid plan.
- CMD
TOO_MANY_RECIPIENTS`to` has more than 30 addresses.
- CMD
INVALID_AUDIENCEThe audience is not valid: unknown group, a segment of another mailbox or a message this mailbox didn’t send.
- CMD
AUDIENCE_OVER_LIMITThe 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.
- CMD
EMPTY_AUDIENCENobody in this audience right now.
- CMD
BEST_TIME_NEEDS_AUDIENCE`best_time` needs an `audience` and `mode: new`.
- CMD
READ_ONLY_ACCESSThe token or app has Read only access and the command writes. In the attachment upload route it is HTTP 403.
- CMD
INVALID_IDEMPOTENCY_KEY`idempotency_key` must have 1–255 characters: letters, numbers, `_ - : .`.
- CMD
IDEMPOTENCY_KEY_REUSEDThis `idempotency_key` was already used with different args. Use a new key for every new email.
- CMD
IDEMPOTENCY_IN_PROGRESSA call with the same `idempotency_key` is still running. Try again in 1 second with the same key.
- CMD
INTERNALServer error. The detail is only written to the server log.