Nothing found

SMS channel

The SMS channel object. It goes into the channel object under the sms key - see Cascade. SMS is also the channel used when channel is omitted from the request entirely.

The object is the same for Advanced transactional and Advanced promotional.

{ "sms": { "sender_id": "gText", "sender_id_value": "BulkGate" } }

SMS object

PARAMETER NAME VALUE MANDATORY DEFAULT VALUE
text Text of the SMS message (max. 612 characters, or 268 characters if Unicode is used), UTF-8 encoding. Overrides the top-level text, see Which text is used No null
sender_id Sender ID type, see Sender ID type No gSystem
sender_id_value Value belonging to sender_id - gOwn (e.g. "420 777 777 777"), gText (e.g. "BulkGate"), gProfile (e.g. "423"), gMobile or gPush (KEY) No null
unicode yes/true/1/on for Unicode SMS, no/false/0/off for 7bit SMS No false

You can add variables from the variables array into text the same way as into the top-level text: Hello <first_name> <last_name>.

Sender ID type sender_id

VALUE DESCRIPTION
gSystem System number
gShort Short Code
gText Text sender
gMobile Mobile Connect
gPush Mobile Connect push - Sends a notification to the Mobile Connect app
gOwn Own number (requires number verification)
gProfile BulkGate Profile ID
<int> BulkGate Profile ID

Passing a whole number as sender_id is a shortcut for the profile: "sender_id": 423 is read as "sender_id": "gProfile" with "sender_id_value": "423".

Note

The parameter flash is still accepted for backward compatibility, but it has no effect on the message.

  • Sender type — system number, short code, text sender, own number
  • Unicode — diacritics and special characters, and why they cut a message to 268 characters
  • Message concatenation — how a long SMS is split into parts and how many characters fit in one

Example of full request

Message to two numbers, sent from a text sender and encoded as Unicode. <first_name> is replaced from the variables array.

POST /api/2.0/advanced/transactional HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json { "application_id": 451, "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj", "number": ["420777777777", "420777777778"], "text": "Hello <first_name>, your order has been shipped.", "variables": {"first_name": "John"}, "country": "cz", "channel": { "sms": { "sender_id": "gText", "sender_id_value": "BulkGate", "unicode": true } } }

Message to two groups from the address book, sent from a Profile ID. same_number prevents a second message to a number that is already in the campaign.

POST /api/2.0/advanced/promotional HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json { "application_id": 451, "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj", "groups": [974, 975], "text": "Hello <first_name>, our spring sale starts today.", "duplicates_check": "same_number", "channel": { "sms": { "sender_id": "gProfile", "sender_id_value": "423" } } }

The response is the same for every channel - see Advanced transactional or Advanced promotional.

Was this page helpful?