Skip to content

Templates

Predefined messages and cell-number groups.

Manage templates

Request

Register a predefined message (pmessage + message) or a predefined cell group (pgroup + cell) to reference later instead of inlining. Requires version=2.55. Note: this operation is not yet fully implemented.

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"
versionstringrequired

Set to 2.55.

Example:"2.55"
pmessagestring

Predefined message name to associate with message.

Example:"HappyBirthday"
messagestring

Message text to store under the pmessage.

Example:"Happy birthday from all of us!"
pgroupstring

Predefined group name to associate with the cell numbers.

Example:"finance-team"
cellstring

Comma-separated numbers (27 format) to store under the pgroup.

Example:"27821234567,27821234568"
curl -i -X POST \
  https://docs.ecommunicate.co.za/_mock/apis/biz-sms/smsbatch/templates \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  --data-urlencode version=2.55 \
  --data-urlencode pmessage=HappyBirthday \
  --data-urlencode 'message=Happy birthday from all of us!'

Responses

XML template result.

Bodyapplication/xml
string
Response
<?xml version="1.0" encoding="UTF-8" ?>
<response xmlns="http://messaging.ecommunicate.biz/sms/response">
    <result>
        <status code="0">success</status>
        <explanation>The request was processed correctly</explanation>
        <completiontime>2026-06-28T22:40:11.399+02:00</completiontime>
    </result>
    <batchsend status="">
        <pmessagename>HappyBirthday</pmessagename>
    </batchsend>
</response>