Method : POST
Endpoint : /api/campaigns/rcs/send-groups
Description : The method provides the ability to send rcs messages to a group of contacts (the group ID is created in the client’s contact book). The ability to send messages via an alternative SMS channel is also supported.
| Parameter | Mandatory | Type | Description. |
|---|---|---|---|
| groups | Yes | Array | An array of lists (list id) with contacts from the address book to which RCS campaigns are to be sent. id of the lists can be obtained: using the Get lists API: https://bsg.world/developers/rest-api/receive-an-index-of-all-contact-lists in your account (Contact Book → Lists) – BSG.world |
| sender | Yes | string | The name of the agent used to send the rcs message. From 1 to 40 characters. |
| tariff_code | No | string | The rate number for charging rcs messages. The specified rate number must be activated in the user’s account and be in the active status. |
| validity | No | integer | RCS message validity period in hours. After this period expires, the message will be in EXPIRED status or will be redirected to the SMS channel if it was specified in the request. The value can be from 1 to 72. The default value is 72 hours. |
| start_at | No | string | The date and time of the message sending for scheduling the campaign. The maximum allowable date and time for scheduling a mailing is 30 days (including the current date) – until 23:59:59 of the 30th day. Value format: “{yyyy-mm-dd hh:mm:ss}” By default, a campaign of the “Instant” type is always created, but if the “start_at” parameter was specified in the request, the System creates a campaign of the “Scheduled” type. |
| options | Yes | Object | The object contains information about the message. |
| alternative_channel | No | Object | The object contains information for sending a message via an alternative SMS channel in case of undeliverable rcs message. |
| check_stop_list | No | boolean | Checks the recipient’s phone number for being on the RCS stop list. Possible values: true – if the number is found in the RCS stop list, do not send a message. false – ignore the RCS stop list. The default is “true”. |
| Field name | Type | Description. |
|---|---|---|
| id | integer | A unique identifier of the created RCS campaign. |
| name | string | The name of the campaign that is automatically generated by the system: “RCS api campaign / {yyyyy-mm-dd hh:mm:ss}”, where yyyy-mm-dd hh:mm:ss is the date and time of the campaign creation. |
| sender | string | Name of the agent. |
| status | string | Campaign status. At the moment of creating a campaign, we display the “creation” status. | |||
|---|---|---|---|---|---|
| message_type | string | Type of message: rcs | |||
| start_at | string | Date and time of the campaign start (planned) in the format: yyyy-mm-dd hh:mm:ss | |||
| real_start_at | string | The actual date and time of the campaign start in the format: yyyy-mm- dd hh:mm:ss. | |||
| finished_at | null|strin g | Campaign end date and time in the format: yyyy-mm-dd hh:mm:ss. When creating a campaign, the value is null. | |||
| created_at | string | Date and time of campaign creation in the format: yyyy- mm-dd hh:mm:ss | |||
| statistics | object | The object of campaign statistics. | |||
| delivered | integer | Total number of delivered rcs messages within the campaign in the following statuses: DELIVERED READ When creating a campaign, it is always = 0. | |||
| sent | integer | Total number of sent rcs messages within the campaign in the following statuses: DELIVERED SENT ACCEPTED SENDING UNDELIVERED FAILED EXPIRED UNKNOWN When creating a campaign, it is always = 0. | |||
| calculated_price | float | Preliminary cost of the campaign. | |||
| alternative_channels | object | The object contains information about messages sent via an alternative channel. | |||
| sms | object | An alternative channel for sending messages. | |||
| statistics | object | An object of statistics of SMS messages sent as part of a campaign. | |||
| delivered | integer | Total number of delivered SMS messages within the campaign in statuses: DELIVERED When creating a campaign, it is always = 0. |
| sent | integer | Total number of SMS messages sent as part of the campaign in statuses: DELIVERED SENT ACCEPTED SENDING UNDELIVERED FAILED EXPIRED UNKNOWN When creating a campaign, it is always = 0. |
{
"groups":[
0
],
"sender":"Agent Name",
"options":{
"cards":[
{
"text":"Go to site",
"media":{
"url":"https://domain.com/"
},
"suggestions":[
{
"text":"Go to site",
"url":"https://domain.com/"
}
]
},
{
"text":"string",
"media":{
"url":"string"
},
"suggestions":[
{
"text":"string",
"url":"string"
}
]
},
{
"text":"string",
"media":{
"url":"string"
},
"suggestions":[
{
"text":"string",
"phone":"string"
}
]
},
{
"title":"string",
"text":"string",
"media":{
"url":"string"
},
"suggestions":[
{
"text":"string",
"url":"string"
}
]
}
]
},
"alternative_channel":{
"sms":{
"text":"Hello, world!",
"sender":"string",
"validity":72,
"check_stop_list":true
}
},
"start_at":"2025-01-25 09:00:00",
"tariff_code":0,
"validity":72,
"add_to_contact_book":true,
"check_stop_list":true
}
If the request is successfully executed:
{
"data":{
"id":1,
"name":"string",
"sender":"string",
"status":"creation",
"message_type":"rcs",
"start_at":"2021-04-27 19:44:06",
"real_start_at":"2021-04-27 19:44:06",
"finished_at":"2021-04-27 19:44:06",
"created_at":"2021-04-27 19:44:06",
"statistics":{
"delivered":0,
"sent":0
},
"calculated_price":123.4,
"alternative_channels":{
"sms":{
"statistic":{
"delivered":0,
"sent":0
}
}
}
}
}