Skip to content

Messaging

Send batch SMS.

Send SMS batch

Request

Send one message to one or many numbers, immediately or scheduled. Provide a source of replies by either setting senderid (non-priority) or priority=true with one of repliesperuserid or manageownreplies+virtualname. Also available over GET for testing (~5 numbers). Returns an XML batch-send result; check <status code> is 0 (or 1 for partial success).

Security
ApiKeyAuth
Bodyapplication/x-www-form-urlencodedrequired
specversionstring

Spec version coded against. The gateway keys on major version 2.

Example:"2.61"
commsversionstring

Communication protocol/version (advisory, for support).

Example:"1.0"
appversionstring

Sending-application version (advisory, for support).

Example:"1.0"
batchrefstringrequired

Client batch reference (max 80 alphanumeric). Reusable across sends.

Example:"Finance-2026-05"
batchidstringrequired

Unique id within the batchref (max 20 alphanumeric).

Example:"1"
messagestringrequired

Message text. Single SMS max 160 chars; longer messages split into segments (see concat/maxparts). URL-encode non-GSM characters.

Example:"Your statement is ready"
cellstringrequired

One or many numbers, comma-separated, each optionally prefixed with an identifier (use a | when the identifier contains digits).

Example:"27821234567, Jane Doe | 27821234568"
senderidstring

Source/from address (max 11 alphanumeric) for non-priority sends. A numeric, reply-capable senderid must start 27. Must not be used with priority.

Example:"eCommunicate"
prioritystring

Prioritise the batch. Requires repliesperuserid or manageownreplies.

Value:"true"
Example:"true"
repliesperuseridstring

One reply path per userid. Mutually exclusive with manageownreplies.

Value:"true"
Example:"true"
manageownrepliesstring

Multiple reply paths via virtual names. Requires virtualname.

Value:"true"
Example:"true"
virtualnamestring

Client-chosen virtual name (max 50), required with manageownreplies.

Example:"campaign-vn1"
concatstring

Concatenate long messages into one handset SMS (153 chars/part, max 9).

Enum:"true""false"
Example:"false"
maxpartsinteger

Maximum message segments (default 9). 0/1 rejects anything over 160 chars.

Example:3
flashstring

Send as a flash SMS (shown on screen, not stored).

Value:"true"
Example:"true"
unicodestring

Send Unicode (UCS-2). 70 chars/SMS, 67/part concatenated.

Enum:"true""false"
Example:"false"
rdrstring

Request Delivery Receipt for each SMS. Required to later pull receipts or use delivery emails/summaries.

Enum:"true""false"
Example:"true"
dsmstring

Don't save message (not stored in the database). Not usable with futuredatetime.

Value:"true"
Example:"true"
futuredatetimestring

Hold the batch until this time (YYYY-MM-DD hh:mm:ss).

Example:"2026-05-22 13:10:00"
expirydatetimestring

Cancel (and refund) if not sent by this time (YYYY-MM-DD hh:mm:ss).

Example:"2026-05-31 13:10:00"
validityinteger

SMSC retry window in minutes (default 10080 = 7 days).

Example:10080
fromemailstring, (email)

From address used for all system-originated emails for this batch.

Example:"noreply@yourcompany.co.za"
sendingemailstring

Enable send-confirmation emails (master switch).

Value:"true"
Example:"true"
sendingemailaddress1string, (email)

First send-confirmation email address.

Example:"ops@yourcompany.co.za"
deliveryemailstring

Enable delivery-receipt emails (master switch; requires rdr).

Value:"true"
Example:"true"
deliveryemailaddress1string, (email)

First delivery-receipt email address.

Example:"ops@yourcompany.co.za"
replyemail1string, (email)

Email address notified per reply SMS.

Example:"replies@yourcompany.co.za"
failuretosendemailaddressstring, (email)

Notified if the batch fails before send-out.

Example:"alerts@yourcompany.co.za"
urlreceiptsstring

URL the gateway POSTs receipts to (requires rdr). Not yet supported.

Example:"https://your-server.com/receipts"
urlrepliesstring

URL the gateway POSTs replies to (requires a replies keyword). Not yet supported.

Example:"https://your-server.com/replies"
curl -i -X POST \
  https://docs.ecommunicate.co.za/_mock/apis/biz-sms/smsbatch/sms \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  --data-urlencode specversion=2.61 \
  --data-urlencode batchref=Finance-2026-05 \
  --data-urlencode batchid=1 \
  --data-urlencode senderid=eCommunicate \
  --data-urlencode 'message=Your statement is ready' \
  --data-urlencode 'cell=27821234567, Jane Doe | 27821234568' \
  --data-urlencode rdr=true

Responses

XML batch-send result.

Bodyapplication/xml
string

Namespaced XML <ecomm:response> document.

Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ecomm:response xmlns:ecomm="http://messaging.ecommunicate.biz/sms/response">
    <ecomm:result>
        <ecomm:status code="1">partial-success</ecomm:status>
        <ecomm:explanation>Some sms sent. There were invalid numbers in the batch.</ecomm:explanation>
        <ecomm:completiontime>2026-01-17T23:03:17.356+02:00</ecomm:completiontime>
        <ecomm:userid>your-userid</ecomm:userid>
        <ecomm:clientref>your-client-ref</ecomm:clientref>
    </ecomm:result>
    <ecomm:batchsend status="">
        <ecomm:batch>
            <ecomm:batchref>Finance-2026-05</ecomm:batchref>
            <ecomm:batchid>1</ecomm:batchid>
        </ecomm:batch>
        <ecomm:totalnumbers>2</ecomm:totalnumbers>
        <ecomm:correctnumbers>1</ecomm:correctnumbers>
        <ecomm:incorrectformat quantity="1">
            <ecomm:numbers>
                <ecomm:number>084300123</ecomm:number>
                <ecomm:reason>Number Length Error</eco…