SMS Message status changes occur throughout the lifespan of a message from creation, through sending, to delivery.
Sends an SMS message. This endpoint supports multiple different ways to send an SMS message with many fields that are mutually exclusive.
For the destination phone number either the to field or the contactId field must be provided. If a contactId is provided, the destination number will be looked up from their contact information.
For the source phone number either the from field or the numberSetId field must be provided. If the numberSetId field is used, a number will be chosen from the number set at random.
For the message body either the text field or the smsTemplateId field must be provided. If using a template, the extData field will be used for any template replacements. If a contact is specified, the provided extData will be used preferentially over the data in the contact when expanding the template.
If sending an MMS message, the mediaUrl property must be provided. In this case the body fields are optional.
Setting the deliveryStatusEnabled flag (default false) will result in a DLR callback.
Setting the messageStatusCallback will result in a POST of json data once the message is sent.
The metadata parameter will allow for passing key/value pairs. If provided, these values will be available on the sms log record as well as any callbacks that are configured for sms.
We recommend using number sets, contacts, and sms templates for API usage since these will result in fewer changes over time.
Possible Success, Accepted and Error codes
|Message blocked. Your message has been blocked from reaching the destination.
|Carrier violation. The carrier is filtering out your messages from being delivered.
|Unallocated. The destination phone number is not allocated to a mobile network.
|Invalid destination. The carrier is reporting the number as being unreachable.
|Unknown. The delivery receipt has returned a generic error message.
|Spam detected. The carrier has blocked/filtered this message as spam.
|Mobile Network error: Temporary disruption in service.
|Mobile Network error: Unable to route message. Please retry.
|Mobile Network error: Network congestion. Please retry.
|Mobile Network error: No response received from carrier. Please retry
|The service type (sms or mms) is not allowed.
|Message is NULL, contains invalid characters or exceeded lengh
|Message too long/large.
|Message not configured for DLR.
|There was an error with the shortened URL used.
|The Campaign Registry campaign error. Campaign may be inactive.
|Message send limit exceeded.
|Account not provisioned for short code messaging.
Mobile operator rejected short code. Reasons: not provisioned, campaign expired or not allowed.
|The `to` or `from` number is blocked.
|The `from` number has been blocked/filtered by carrier.
|The `to` number is blocked/opted out from receiving messages.
|The `from` or `to` number is either invalid, inactive or not enabled for service type.
|Either the `to` or `from` is not enabled for toll-free messaging.
|Messaging not enabled for destination country.
|Messaging to an emergency number is forbidden.
|The `to` number unavailable. Message is stored and will be resent.
|Unverified toll-free number.
|Malformed message. Contact you system administrator.
Example of Accepted DLR Response