Skip to main content

SMS Status Codes

This reference documents all SMS delivery statuses, detailed status codes, and error codes returned by the Exotel platform. Use these codes to diagnose delivery issues and automate error handling.

High-Level Statuses​

Every SMS has a top-level Status field that indicates its current state:

StatusDescription
queuedMessage accepted by Exotel and queued for processing
sendingMessage is being transmitted to the telecom operator
submittedMessage submitted to the carrier network
sentMessage sent by the carrier (awaiting handset confirmation)
deliveredMessage successfully delivered to the recipient's handset
failedMessage delivery failed (see DetailedStatus for reason)
expiredCarrier could not deliver the message within the validity period
undeliveredMessage could not be delivered (final state)

Status Flow​

queued → sending → submitted → sent → delivered
→ failed
→ expired
→ undelivered

Detailed Status Codes​

The DetailedStatus and DetailedStatusCode fields provide granular information about the message outcome.

Success Codes (2xxxx)​

CodeDetailedStatusDescription
20000DELIVERED_TO_HANDSETMessage delivered to the recipient's phone
20001DELIVERED_TO_OPERATORMessage delivered to the operator (handset confirmation pending)
20002SUBMITTED_TO_CARRIERMessage submitted to the carrier successfully

DLT Failure Codes (30001-30009)​

CodeDetailedStatusDescriptionResolution
30001FAILED_DLT_TEMPLATEMessage body does not match any approved DLT templateEnsure message exactly matches the template; only {#var#} values should change
30002FAILED_DLT_ENTITYDLT entity ID is invalid or not registeredVerify your entity ID in the DLT portal; allow 5-7 days for cross-portal sync
30003FAILED_INVALID_SENDERSender ID (header) is not registered or not approvedRegister the sender ID on the DLT portal and map it in Exotel
30004FAILED_DNDRecipient is on the National DND registryUse transactional SMS type for essential communications
30005FAILED_DLT_SCRUBBINGMessage failed DLT scrubbing validationCheck template ID, entity ID, and sender ID combination
30006FAILED_DLT_CONSENTConsent not registered for this recipientRegister consent on the DLT portal for promotional messages
30007FAILED_DLT_PREFERENCERecipient has set category preferences blocking this messageRespect recipient's category preferences

Number and Routing Failures (30010-30019)​

CodeDetailedStatusDescriptionResolution
30010FAILED_INVALID_NUMBERPhone number is invalid or not a mobile numberVerify the recipient's phone number format
30011FAILED_UNREACHABLERecipient's phone is switched off or out of coverageRetry after some time
30012FAILED_NETWORK_ERRORTemporary network issue with the carrierRetry the message after a few minutes
30013FAILED_OPERATOR_REJECTEDCarrier rejected the messageContact Exotel support for specific operator rejection reason
30014FAILED_SPAM_DETECTEDMessage flagged as spam by the operatorReview message content; avoid spam-like language

Expiry and Timeout Codes (30020-30029)​

CodeDetailedStatusDescriptionResolution
30020EXPIREDMessage validity period expired before deliveryRecipient may be unreachable; resend if the message is still relevant
30021EXPIRED_HANDSET_OFFRecipient's phone was off during the validity periodResend when the recipient is likely available
30022EXPIRED_MEMORY_FULLRecipient's phone memory (SMS inbox) is fullCannot be resolved on your end; recipient needs to clear their inbox

Account and System Errors (30030-30049)​

CodeDetailedStatusDescriptionResolution
30030FAILED_INSUFFICIENT_BALANCEAccount does not have enough SMS creditsRecharge your Exotel account
30031FAILED_ACCOUNT_SUSPENDEDYour Exotel account is suspendedContact Exotel support to resolve account issues
30032FAILED_RATE_LIMITEDAPI rate limit exceededReduce request rate; stay within 200 requests/minute
30033FAILED_SYSTEM_ERRORInternal Exotel system errorRetry the message; contact support if it persists

Content Errors (30050-30059)​

CodeDetailedStatusDescriptionResolution
30050FAILED_ENCODING_ERRORMessage encoding mismatchSet EncodingType=unicode for non-Latin scripts
30051FAILED_MESSAGE_TOO_LONGMessage exceeds maximum allowed lengthShorten the message (max 10 concatenated segments)
30052FAILED_EMPTY_BODYMessage body is emptyProvide a message body

Unknown and Other Codes (30099)​

CodeDetailedStatusDescriptionResolution
30099FAILED_UNKNOWNUnknown failure reasonContact Exotel support with the SmsSid for investigation

Interpreting Status Codes in Callbacks​

When you receive a delivery callback, the status code helps determine the appropriate action:

function handleDeliveryCallback(payload) {
const { SmsSid, DetailedStatusCode, DetailedStatus } = payload;

if (DetailedStatusCode >= 20000 && DetailedStatusCode < 30000) {
// Success - message delivered
markAsDelivered(SmsSid);
} else if (DetailedStatusCode >= 30001 && DetailedStatusCode <= 30007) {
// DLT failure - configuration issue
logDltError(SmsSid, DetailedStatus);
alertAdmin('DLT configuration error', DetailedStatus);
} else if (DetailedStatusCode >= 30010 && DetailedStatusCode <= 30014) {
// Delivery failure - may be retryable
if (DetailedStatusCode === 30011 || DetailedStatusCode === 30012) {
scheduleRetry(SmsSid);
} else {
markAsFailed(SmsSid, DetailedStatus);
}
} else if (DetailedStatusCode >= 30020 && DetailedStatusCode <= 30029) {
// Expired - consider resending
markAsExpired(SmsSid);
} else if (DetailedStatusCode >= 30030 && DetailedStatusCode <= 30049) {
// Account/system issue - needs attention
alertAdmin('Account or system error', DetailedStatus);
} else {
// Unknown - log and investigate
logUnknownStatus(SmsSid, DetailedStatusCode, DetailedStatus);
}
}

Retryable vs. Non-Retryable Failures​

CategoryRetryableCodesAction
DLT failuresNo30001-30007Fix DLT configuration, then resend
Invalid numberNo30010Remove from contact list
Unreachable / NetworkYes30011, 30012Retry after 15-30 minutes
Operator rejectedMaybe30013Investigate; contact support
Spam detectedNo30014Revise message content
ExpiredYes30020-30022Resend if still relevant
Insufficient balanceNo30030Recharge, then resend
Rate limitedYes30032Wait, then retry with backoff
System errorYes30033Retry after a few minutes
tip

Implement an automatic retry mechanism for retryable failures. Use exponential backoff (e.g., 1 minute, 5 minutes, 15 minutes) to avoid overwhelming the system.

Monitoring and Alerting​

Set up alerts for the following conditions:

ConditionThresholdAction
DLT failures spike> 5% of sendsCheck DLT configuration
Delivery rate drops< 90%Investigate carrier issues
Insufficient balanceAny occurrenceRecharge immediately
System errors> 1% of sendsContact Exotel support
Unknown failuresAny occurrenceLog and investigate

Next Steps​