Skip to content

Outgoing SMS

Sending Outgoing SMS, also known as MT SMS, short for Mobile Terminated SMS, is when you want to deliver a SMS to a mobile device.

Basic Usage

API Call

POST /sms/mtsms

The root element can be either a dict with a single SMS or a list of SMS’es. You can send data in JSON format, or even as http form data or query args.

Request, Response and Error

Request JSON Object

  • message (string) – The content of the SMS, always specified in UTF-8 encoding, which we will transcode depending on the “encoding” field. The default is the usual GSM 03.38 encoding. required

  • sender (string) – Up to 11 alphanumeric characters, or 15 digits, that will be shown as the sender of the SMS. See SMS Sender

  • recipients (array) – Array of recipients, described below. The number of recipients in a single message is limited to 10.000. required

Request JSON Array of Objects

  • msisdn (string) – MSISDN aka the full mobile phone number of the recipient. required

Response JSON Object

  • ids (array) – If successful you receive a object containing a list of message ids.
  • usage (dictionary) – If successful you receive a usage dictionary with usage information for you request.
Status Codes

Examples

Example

POST /v2/mtsms/?token=API-token HTTP/1.1
Host: sms.mavorion.com
Accept: application/json, text/javascript
Content-Type: application/json

{
    "token": "Xks23kDEksU78skS",
    "sender": "InfoSMS",
    "recipients": [
        {
            "msisdn": "9801247606",
        },
        {
            "msisdn": 9801247607
        }
    ],
    "message": "Hello World",
    "label": "Mavorion Inc",
    "dry_run": "1"
}

Connection Limit

The API has a limit of 40 open connections per IP address, if you have more than 40 open connections the web server will reject your requests. If you need to send lots of smses consider bulking your requests with multiple recipients, you can use tags and tagvalues to add unique data per recipient, bulking your requests will also increase your delivery speed compared to making a single request per recipient.

Tip

For more examples, check out the Examples Page.

Tip

For more advanced sending options, check out Advanced Sending page.