Nothing found

Promotional SMS – specification

API URL

The URL used to send the HTTP requests:

https://portal.bulkgate.com/api/1.0/simple/promotional
Note

If the request does not reach its destination, repeat it on the backup server backup1.bulkgate.com.

Supported HTTP methods

  • GET
  • POST - application/x-www-form-urlencoded
  • POST - application/json

See request methods for examples of each.

Parameters table

PARAMETER NAME VALUE MANDATORY DEFAULT VALUE
application_id Application indentificator Yes -
application_token Application authentication token Yes -
number Recipient number separated by ; (semicolon) Yes -
text Text of SMS message (max. 612 characters, or 268 characters if Unicode is used), UTF-8 enconding Yes -
unicode Yes/true/1 for Unicode SMS, no/false/0 for 7bit SMS No false
sender_id Sender ID, viz sender ID type No gSystem
sender_id_value Sender value - gOwn (e.g. "420 777 777 777"), gText (e.g. "BulkGate"), gProfile (e.g. "423"), gMobile or gPush (KEY)
country Provide the recipients' numbers in an international format (with prefix, e.g. 44) or add the country code (7820125799 + GB = 447820125799). See the country example request. If null, your set timezone will be used to fill the information No null
schedule Schedule the sending date/time in unix timestamp, or ISO 8601. See examples below The value now sends the message immediately, same as omitting the parameter. No Now
duplicates_check Select on to prevent sending duplicate messages to the same phone number. Messages with the same text sent to the same number will be removed. If off no duplicates will be removed. Duplicates are removed within a single batch only, not across requests. No off
tag Message label for subsequent retrieval of the user. No -

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 (number verification required)
gProfile BulkGate Profile ID
<int> BulkGate Profile ID

Request examples

Example of full request:

https://portal.bulkgate.com/api/1.0/simple/promotional ?application_id=451 &application_token=NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj &number=447700900000;7811901234;447712345678 &text=test_sms &unicode=yes &sender_id=gText &sender_id_value=BulkGate &country=gb &schedule=2018-05-14T18:30:00-01:00

Example of country request:

https://portal.bulkgate.com/api/1.0/simple/promotional ?application_id=451 &application_token=NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj &number=7811901234;447712345678 &text=test_sms &country=gb

Example of ISO 8601 request:

https://portal.bulkgate.com/api/1.0/simple/promotional ?application_id=451 &application_token=NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj &number=447700900000;447811901234 &text=test_sms &schedule=2018-05-14T18:30:00-01:00

Example of unix timestamp request:

https://portal.bulkgate.com/api/1.0/simple/promotional ?application_id=451 &application_token=NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj &number=447700900000;447811901234 &text=test_sms &schedule=1526992636

Example of POST JSON request:

POST /api/1.0/simple/promotional HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json { "application_id": 451, "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj", "number": "447700900000;7811901234;447712345678", "text": "test_sms", "unicode": true, "sender_id": "gText", "sender_id_value": "BulkGate", "country": "gb", "schedule": "2018-05-14T18:30:00-01:00" }

Response

In case of success:

{ "data": { "total": { "status": { "sent": 0, "accepted": 0, "scheduled": 2, "error": 1 } }, "response": [ { "status": "scheduled", "sms_id": "idfkvqrp-0", "part_id": [ "idfkvqrp-0_1", "idfkvqrp-0_2", "idfkvqrp-0" ], "number": "447700900000" }, { "status": "scheduled", "sms_id": "idfkvqrp-1", "part_id": [ "idfkvqrp-1_1", "idfkvqrp-1_2", "idfkvqrp-1" ], "number": "447811901234" }, { "status": "error", "code": 9, "error": "Invalid phone number", "number": "44771447678" } ] } }

Where:

  • part_ID is the ID array of the parts of the original long message that were split because they did not meet the 160 character limit for a single message. More info here.

In case of error:

{ "type": "invalid_phone_number", "code": 400, "error": "Invalid phone number", "detail": null } { "type": "unknown_identity", "code": 401, "error": "Unknown identity / unauthorized / empty application_id", "detail": null }

Where:

  • type and error (description of the error) can be found in the error types table
  • code represents http error
  • detail is an additional info about the error

See all the error types for Simple API and Advanced API here.

Was this page helpful?