Promotional SMS – specification (Advanced API)
API URL
URL used to send HTTP requests:
If the request does not reach its destination, repeat it on the backup server backup1.bulkgate.com.
Supported HTTP methods
POST-application/json
Parameters table
| PARAMETER NAME | VALUE | MANDATORY | DEFAULT VALUE |
|---|---|---|---|
| application_id | Application ID | Yes | - |
| application_token | Application token | Yes | - |
| number | Array of recipients - Value number | Yes or admins or groups |
- |
| groups | Array of numbers of groups in BulkGate address book. More info | Yes or number or admins |
- |
| admins | Array of numbers of BulkGate administrators receiving notifications. More info | Yes or number or groups |
- |
| text | Text of the SMS message (max. 612 characters, or 268 characters, if Unicode is activated), UTF-8 encoding | Yes, if number is given by the array of numbers or the parameter groups or admin is used |
- |
| channel | Alternative channels. Channels are tried in a cascade, in the order in which you list them in the object - if we are unable to deliver your message via the first channel, the next one in the list is used. SMS is not appended automatically; if you want it as the last fallback, include the sms object in the cascade. When no channel is given at all, the message is sent as SMS. |
No | SMS object |
| country | Provide recipient numbers in international format (with prefix, for e.g 44), or add country code (777777777 + GB = 44777777777). See the example of a country requirement. If the value is null, your set time zone will be used to fill in the information |
No | null |
| schedule | Schedule the sending time and date in unix timestamp, or ISO 8601. See examples below | No | Now |
| duplicates_check | Select same_text to prevent sending duplicate messages to the same phone number. Disable the possibility to send a message with either the same or different text to the same number with same_number. If null no duplicates will be removed. Duplicates are removed within a single batch only, not across requests. |
No | null |
| tag | Message label for subsequent retrieval of the user. | No | - |
Value number
The value number can be written in two ways:
- Array of phone numbers
- Associative array with diagram
number,text, andvariables, where the only required parameter isnumber. Ifnumberis not filled in, the message skips.
You can add variables from the array variables into the template of parameter text.
Channels
The channel object decides which channels the message is sent through and in what order. The order of the keys in your request is the order of the cascade and SMS is not appended to it automatically - see Channel cascade.
| KEY | CHANNEL OBJECT |
|---|---|
sms |
SMS |
viber |
Viber – promotional |
rcs |
RCS |
whatsapp |
Request examples
Example of full request:
Example of a request to enter recipients by the array of numbers and to schedule the time in the unix timestamp:
Response
In case of success:
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:
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.
Thank you for your feedback.