SMS API Documentation

Send MMS

The XML API supports utf-8 encoded XML. Requests should be made using HTTP POST with a Content-Type of text/xml. For performance reasons the maximum request size is 500 messages.

https://api.mediaburst.co.uk/xml/send.aspx

MMS Payloads

MMS payloads can be defined in two places:

  1. At the top of the XML for payloads used across multiple messages. These can then be used in messages using the PayloadId parameter to cut down on the POST size.
  2. Within a single message as with an SMS

Binary content can either be Base64 or Hex encoded, this can done using the Base64Payload or HexPayload parameters, they both work the same, use whichever is easiest in your programming language. For simplicity text content doesn’t need encoding and can be sent in the TextPayload parameter.

Each payload item should have a filename. These must be unique within a single MMS and specified as a filename attribute on the payload. For handset compatability it’s best not to use any spaces or punctuation in filenames.

MMS functionality and compatibility is highly reliant on the receiving handset.

Request Parameters

Parameter Type Default Required
Username String Yes
Password String Yes
To MSISDN Yes
From MSISDN or Alphatag User configurable No
ClientID String No
DlrType Integer User configurable No
DlrUrl String User configurable Sometimes
DlrContent String User configurable Sometimes
UniqueId Integer User configurable No
Subject String No
Payloads Container Yes
PayloadId String No
TextPayload String No
HexPayload Hexadecimal String No
Base64Payload Base64 String No

Description of Request Parameters

Username

Your username as supplied when you signed up

Password

Your password as supplied when you signed up.

To

A phone number in international number format without a leading ‘+’ or an international dialing prefix, e.g. 441234567890.

From

A maximum of 11 characters or 12 digits, we recommend you use a valid phone number as this gets the highest successful delivery rate. If not specified, your account default will be used.

ClientID

A unique Message ID specified by the connecting application, for example your database record ID.
Maximum length: 50 characters.

UniqueId

Possible Values:

UniqueId Description
0 Unique ID checks disabled
1 Unique ID checks Enabled

If Unique ID checks are enabled, the ClientID specified by the connecting application must be unique within the last 12 hours. This is to prevent the connecting application from falsely sending duplicate messages to a phone.

Subject

The MMS Subject for display on the receiving handset. Usually displayed in the inbox before opening the message. This should be sent as a UTF-8 string.

Payloads

This is a container tag used within the XML to group together the Payload tags.

PayloadId

A unique ID referencing an MMS Payload defined at the start of an XML send. This should be used if you are sending the same content to multiple recipients.

TextPayload

This can be used to define a text attachment within the MMS (UTF-8 encoded) in an easy to implement format.

HexPayload

This is used to define MMS attachments of any supported type in a string of hexadecimal values. The attachment content type should be set as an attribute through the XML interface, these should be IANA registered MIME types such as text/plain.

Base64Payload

This is used to define MMS attachments of any supported type in a string of base64 encoded values. The attachment content type should be set as an attribute through the XML interface, these should be IANA registered MIME types such as text/plain.

Response Parameters

Parameter Type
To MSISDN
MessageID String
ClientID String
ErrNo String
ErrDesc String

Description of Response Parameters

To

Phone number message was sent to

MessageID

Unique ID assigned to this message by mediaburst. Every successful message will have a message ID, you will need this ID to match up delivery receipts.

ClientID

Your Client ID, passed back for your reference only. This field is only supplied if the Client ID was specified in the request.

ErrNo

The API Error Code. This parameter will only be populated if an error occurred sending the message.

ErrDesc

A text description of the API error code.

Examples

Inline Payload

Send the message “Base64 Inline” to mobile number 441234567980 using Base64 encoding.

<?xml version="1.0" encoding="UTF-8"?>
<Message>
    <Username>username</Username>
    <Password>password</Password>
    <MMS>
        <To>441234567980</To>
        <Payloads>
            <Base64Payload content-type="text/plain" filename="text_inline.txt">QmFzZTY0IElubGluZQ==</Base64Payload>
        </Payloads>
        <From>84433</From>
    </MMS>
</Message>
<?xml version="1.0" encoding="utf-8"?>
<Message_Resp>
    <MMS_Resp>
        <To>441234567980</To>
        <MessageID>AB_123456</MessageID>
    </MMS_Resp>
</Message_Resp>

Predefined Payloads

This sends the same payload to two users, but for efficiency only defines the content once.

<?xml version="1.0" encoding="UTF-8"?>
<Message>
    <Username>username</Username>
    <Password>password</Password>
    <Payloads>
        <TextPayload id="text_1" filename="text1.txt">Text One</TextPayload>
    </Payloads>
    <MMS>
        <To>441234567890</To>
        <Payloads>
            <PayloadId>text_1</PayloadId>
        </Payloads>
        <From>84433</From>
    </MMS>
    <MMS>
        <To>441234567891</To>
        <Payloads>
            <PayloadId>text_1</PayloadId>
        </Payloads>
        <From>84433</From>
    </MMS>
</Message>
<?xml version="1.0" encoding="utf-8"?>
<Message_Resp>
    <MMS_Resp>
        <To>441234567980</To>
        <MessageID>AB_123456</MessageID>
    </MMS_Resp>
    <MMS_Resp>
        <To>441234567891</To>
        <MessageID>AB_123457</MessageID>
    </MMS_Resp>
</Message_Resp>