To send a message to a mobile device, you’ll need to use the POST method with this API, which will allow you to define the destination of the message, the source, the body of the message, and other key details. Upon receiving the call, our system will respond with a unique messageID and a few other details.

All Vibes calls and responses are written in XML.

Remember that to make a call to any of Vibes’ APIs, you’ll need to include Authentication and all required headers.

Example of a Call

To start, here’s an example of a call. The required elements are detailed below.

POST

<?xml version="1.0" encoding="UTF-8"?>

<mtMessage submitterMessageId="239487234987234" splitLongMessage="true">
    <destination carrier="102" address="+18475551212" type="MDN" />
    <source address="98765" type="SC" />
    <text>123857AB12</text>
    <receiptOption callbackUrl="http://www.client.com/callback" >ERROR</receiptOption>
    <transaction id="6439376297230"/>
</mtMessage>

Elements and Attributes of a Call

Required

mtMessage

This is the main wrapper for your submit request.

Attribute NameDescriptionData TypeRequired?Default
submitterMessageIdUse this attribute to define your own ID for a message for future reference purposes. The identifier must be 40 characters or less.StringNo
alternateDeliveryAvailable for v3.1+ only.

Set this to true if you would like a message to use an alternate message delivery mechanism if the message from the short code fails.

Note: To use this feature, a long code must be assigned to the short code prior to sending any messages.
BooleanNoFalse
splitLongMessageThis flag determines whether any messages greater than 160 characters be split into multiple messages.

For those carriers that support concatenated messages , the message may appear as a single message up to 900 characters. Read more about message splitting here.
BooleanNoFalse

destination

This element defines the destination to deliver the outgoing message.

Attribute NameDescriptionData TypeRequired?Default
carrierThe carrier network the Mobile Phone is on. If it is not specified, the system will query for the correct carrier.StringNo
addressThe mobile device number (MDN) to deliver the message to. This must be specified in e.164 international format with a leading +.StringYes

source

Attribute NameDescriptionData TypeRequired?Default
addressYour identifying short, long, or alpha code, which will appear to the receiver as the sender of the message.

If you are using a long code, do not include the leading +.
StringYes
typeThe type of number of the sender.

- If sending from a short or long code, the value should be SC.
- If sending from an international alpha code, the value should be ANC.
StringNoSC

text

This element defines the text of the message you’d like to send. The message must be encoded in XML. If splitLongMessage is NOT set to True in mtMessage, then the message must be 160 characters or less.

Optional

Each of the following elements are optional.

receiptOption

This element indicates the receipt notifications that should be sent as a callback for this message.

Available values are as follows:

  • NONE - send no notifications.
  • ERROR - send only error notifications (includes error deliver receipts).
  • ALL - send all notifications (includes DLRs).
  • SMSC_ERROR - send only error notifications that come from the carrier (next Hop) upon send (does not include delivery receipts).
  • SMSC_ALL - send only notifications that from the carrier (next Hop) upon send (does not include delivery receipts).
Attribute NameDescription
callbackUrlThis attribute defines the URL that all receipt notifications should be delivered to. If the receiptOption value is NONE, the value of this attribute will be ignored. The characters must be encoded in XML.

transaction

This element references the message (if any) that started this conversation. If this MT message is an alert, this element should be omitted.

Attribute NameDescriptionData TypeRequired for this element?Default
idThe value of the transaction ID provided with the MO message that started this conversation. The value may be up to 40 characters.StringYesN/A

companyId

The Company ID this message is being sent for.

Response

mtMessageRsp is the main wrapper for a response.

Attribute NameDescriptionData Type
messageIdThe Vibes identifier for the message submitted.String
submitterMessageIdIf submitterMessageId was set in your request, it may be repeated in the response.String
carrierThe carrier code of the network the message receiver’s Mobile Phone is on. If a carrier is submitted with the request the same is returned, otherwise the carrier that is queried is returned.String
splitLongMessageIf splitLongMessage is set to True on the request, this may be repeated in the response.Boolean

Reference Table

The reference tables below contain the same information as above, but in a quick-reference table form.

Request

ElementAttribute NameDescriptionData TypeRequired?Default
mtMessageThe main wrapper element around the submit request.Yes
submitterMessageIdUse this attribute to define your own ID for a message for future reference purposes. The identifier must be 40 characters or less.StringNo
alternateDeliveryAvailable for v3.1+ only.

Set this to “true” if you would like a message to use the alternate message delivery mechanism if the message from the short code fails.

Note: To use this feature, a long code must be assigned to the short code prior to sending any messages.
BooleanNoFalse
splitLongMessageThis flag determines whether any messages greater than 160 characters be split into multiple messages.

Note: If the carrier supports concatenated messages, it will appear as a single message to the end user.
BooleanNoFalse
destinationThis element defines the destination to deliver the outgoing message.Yes
carrierThe carrier network the Mobile Phone is on. If it is not specified, the system will query for the correct carrier.StringNo
addressThe mobile device number (MDN) to deliver the message to. This must be specified in e.164 international format with a leading +.StringYes
~~type~~The address type for delivery. Currently, the only supported type is MDN for cellular telephone.StringNoMDN
sourceThis element defines what mobile device number is the sender of the message.Yes
addressYour identifying short, long, or alpha code, which will appear to the receiver as the sender of the message.

If you are using a long code, do not include the leading +.
StringYes
typeThe type of number of the sender.

- If sending from a short or long code, the value should be SC.
- If sending from an international alpha code, the value should be ANC.
StringNoSC
textThe text of the message you’d like to send. The characters must be encoded in XML. Must be 160 characters or less if the splitLongMessage is NOT set to True, and 900 characters or less if splitLongMessage is set to True (unencoded).StringYes
receiptOptionThis element indicates the receipt notifications that should be sent as a callback for this message.

Available values are as follows:

- NONE - send no notifications.

- ERROR - send only error notifications (includes error DLRs).
- ALL - send all notifications (includes DLRs).
- SMSC_ERROR - send only error notifications that come from the carrier (next Hop) upon send (does not include DLRs).
- SMSC_ALL - send only notifications that from the carrier (next Hop) upon send (does not include DLRs).
StringNoNONE
callbackUrlThis attribute defines the URL that all receipt notifications should be delivered to. If the receiptOption value is NONE, the value of this attribute will be ignored. The characters must be encoded in XML.
transactionThis element references the message (if any) that started this conversation. If this MT message is an alert, this element should be omitted.No
idThe value of the transaction ID provided with the MO message that started this conversation. The value may be up to 40 characters.StringYes
companyIdThe Company ID this message is being sent for.LongNo

Response

ElementAttribute NameDescriptionData TypeRequired?
mtMessageRspThe main wrapper element around the Submit response.Yes
messageIdThe Vibes identifier for the message submitted.StringYes
submitterMessageIdIf submitterMessageId was set in your request, it may be repeated in the response.StringNo
carrierThe carrier code of the network the message receiver’s Mobile Phone is on. If a carrier is submitted with the request the same is returned, otherwise the carrier that is queried is returned.StringYes
splitLongMessageIf splitLongMessage is set to True on the request, this may be repeated in the response.BooleanNo

Example success response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<mtMessageRsp submitterMessageId="AnyValue" messageId="e9efe523-aa57-4fdb-8f57-f15a4b06c91e" splitLongMessage="true"/>

Example failure response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<error code="1031" description="Unable to resolve Carrier for MDN: 5125551212, Reason Unsupported MDN: 15125551212" retriable="false"/>

Language
Click Try It! to start a request and see the response here!