The simplest way to send an MMS message is strip it down to just the HTTP POST and use a simple tool like cURL to send it. To make this easier for you, we’ve provided you with two executable code sample .zip files, which can be downloaded and edited for your ease of use.

Copy-and-paste warning

Remember: SOAP-based protocols are highly dependent on formatting of your calls. Because of this, you should not simply copy-and-paste Example One: sampleHeader.txt or Example Two: sampleBody.txt as they appear on this page. If you do so, the code will lose any full carriage return (/r/n) characters from the example, which will make the code incorrect.

Instead of copying and pasting, please, download the Curl examples and do not remove any carriage return or line feed characters from it. Remember, with SOAP-based protocols, every line and space matters!


CURL tip

Since an MM7 call can get bulky, we recommend writing your header values and post body into separate files and use Curl command line arguments to load them. This is what we’ve done for the sake of this example.


This example includes an image. In order to use this code, To use the code, you will need to change the following elements:

  • Authorization: This header value expects a Basic authorization string which is "Basic" + space + your username:password base 64 encoded.
  • X-Vibes-CarrierCode: Enter a valid carrier code for the carrier of the phone to which you will be sending the message, if known. Otherwise, the carrier is looked up.
  • X-Vibes-DlrCallbackUrl: The URL to which Delivery Reports should be sent. Learn more about how your delivery receipt options.

For a full list of header elements, please see send an MMS.

One more time...

Again, each new line should be a full carriage return (/r/n). This is very important for the code to run correctly.

Instead of copying-and-pasting, we recommend download the .zip files.

MIME-Version: 1.0
Content-Type: multipart/related; type="text/xml"; start="<rootpart>"; boundary="----=_Part_2_1764018763.1515602889819"
Authorization: Basic <<insert base 64 encoded username:password>>
X-Vibes-CarrierCode: <<insert vibes carrier code>>
Accept-Encoding: gzip,deflate

Delivery Report Request Options

The X-Vibes-DlrCallbackUrl information can be set or not set backed on your preference. The table below specifies how the Multimedia Message Service Center (MMSC) would process the various delivery report request options.

X-Vibes-DlrCallbackUrl Header SetX-Vibes-DlrCallbackUrl Header Not Set
Delivery Report Flag Set to trueDelivery Reports will be requested from the carrier, and any final status report returned from the carrier is sent to the Callback URL.Delivery Reports are requested from the carrier, but no callbacks are sent to the client.
Delivery Report Flag Set to falseThe delivery status of the message to carrier is returned to the Callback URL. Delivery Reports are not requested from the carrier.Delivery reports are not requested from the carrier, and no callbacks are sent to the client.


This example includes an image, a text attachment, and a SMIL file. To use the code, you will need to change the following elements:

  • ShortCode: Enter a valid Vibes-provisioned shortcode with MMS enabled.
  • Recipients > Number: Enter a valid E.164 formatted phone number (for US +1XXXYYYZZZZ).

For a full list of body elements, please see send an MMS.

Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart>
<?xml version="1.0" encoding="utf-16"?><soapenv:Envelope xmlns:soapenv="">
        <TransactionID xmlns="">ea92fdc3-44e9-466a-9c40-f51a704a2590</TransactionID>
    <soapenv:Body xmlns:ns3="">
        <ns3:SubmitReq xmlns="">
                    <ns3:ShortCode> <<YOUR SHORTCODE>> </ns3:ShortCode>
                    <ns3:Number><<YOUR E164 FORMAT PHONE NUMBER>></ns3:Number>
            <ns3:Subject>Vibes Testing</ns3:Subject>
            <ns3:Content href="cid:attachment.cid"/>
Content-Type: multipart/related; boundary="----=_Part_1_508319571.1515623980041"; type="image/jpeg; name=icon_market.jpg"; start="<icon_market.jpg>"
Content-Transfer-Encoding: binary
Content-ID: <attachment.cid>
Content-Type: image/jpeg; name=icon_market.jpg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=icon_market.jpg
Content-ID: <image.cid>

Curl Command

Once your header and body files are completed, you can send the message with the following command:

curl -H @sampleHeader.txt --data-binary @sampleBody.txt



The Curl version needed for the Samples must be at least 7.61.0.

Sample Files

You can download the sample files below to make it easier to use them.