API Documentation

Bulk SMS / Intro

Bulk SMS

API Integration:

Please use the Simple API unless you will give end users a way to opt-out and you want us to block SMS messages going to anyone who has opted out, then use the Batch/XML API.

Code Libraries - GitHub

Mobivate also provides sample libraries (PHP, C# & Java). For more information please check out GitHub

Simple API example:

GET: https://app.mobivatebulksms.com/gateway/api/simple/MT?USER_NAME=USERNAME&PASSWORD=PASSWORD&ORIGINATOR=ABC&RECIPIENT=447123123123&ROUTE=mglobal&MESSAGE_TEXT=hello

For more information, click here

Batch API example:

POST:

https://app.mobivatebulksms.com/bulksms/xmlapi/{USERNAME}:{PASSWORD}/send/sms/batch

You should post a single parameter called xml= and the content of it should look like this.

xml=<batchmulti>
    <detailedResponse>true</detailedResponse>
    <filterOptouts>true</filterOptouts>
    <routeId>mglobal</routeId>
    <originator>test</originator>
    <messageSpread>2</messageSpread>
    <body><![CDATA[default message]]></body>
    <recipients>
        <recipient>
            <originator>from</originator>
            <recipient>6120001000</recipient>
            <reference>reference1000</reference>
        </recipient>
        <recipient>
            <body><![CDATA[message1001]]></body>
            <originator>from</originator>
            <recipient>6120001001</recipient>
            <reference>reference1001</reference>
            <routeId>99937bb8-8ccc-4321-a97f-6346f8212345</routeId>
        </recipient>
        ...
    </recipients>
</batchmulti>

If your project is coded in PHP, we suggest that you use our Mobivate.php repository

git clone https://github.com/mobivate/mobivate.php.git mobivate

and then simply

<?php require_once("mobivate/BulkSMS.php");

# Create client instance
$bulksms = new Blender\Client\BulkSMS();

# Login to gateway
$bulksms->login($USERNAME, $PASSWORD);

# Create batch
$batch = new Blender\Client\BatchMessageSingleBody();

# Set originator
$batch->setOriginator("test");

# Set route id
$batch->setRouteId($ROUTE_ID);

# Set message body (for all recipients)
$batch->setBody("Batch unicode message with 漢語");

## Recipients ##
$batch->addMSISDN("61000000001");
$batch->addMSISDN("61000000002");
$batch->addMSISDN("61000000003");

# Send message
$responseXml = $bulksms->sendBatch($batch);

Extended Documentation

For the full documentation please download the PDF version


← Previous Page - Next Page →