Skip to main content
PUT/sms-campaign/:id/

Add recipient SMS campaign

You can add recipients to an existing SMS campaign.

AttributesTypeRequiredDescription
idintegeryesA unique identifier for the campaign which is given by User.com
descriptionstringnoA description of the SMS campaign.
etastringnoA datetime when a campaign should be sent. If not provided, the campaign will be sent right away.
namestringyesA SMS campaign name.
phone_numberstringyesA phone number where SMS will be sent
recipientsobjectnoA list of user_ids.
recipients_countintegernoA number of recipients.
statusintegernoA status of your campaign (1 - draft, 2 - active, 3 - finished, 4- archived).
typeintegernoA type of SMS campaign (1 - simple, 2 - automated).

Request​

curl -X PUT
"https://<your_app_subdomain>.user.com/api/public/sms-campaign/:id/"
-H 'Authorization: Token <your_64_char_api_key>'
-H 'Cache-Control: no-cache'
-H 'Content-Type: application/json'
-d '{
"name": "Sample SMS campaign",
"phone_number": {
"provider": "Phone number provider",
"phone_number": "123123123",
"name": "Custom name of your phone number"
},
"recipients": [5,6,7,8]
}'

Response​

{
"id": 8,
"name": "Sample SMS campaign",
"description": "",
"app": 1,
"phone_number": {
"id": 3,
"app": 1,
"provider": "Phone number provider",
"country": "",
"phone_number": "123123123",
"name": "Custom name of your phone number",
"description": "",
"sms": false,
"voice": false,
"price": "0.00",
"last_used_at": null,
"created_at": "2018-02-19T13:01:41.083625Z",
"updated_at": "2018-02-19T13:01:41.083655Z",
"record_incoming_calls": false
},
"type": 1,
"eta": null,
"status": 1,
"recipients": [
1,
2,
3,
4,
5,
6,
7,
8,
],
"recipients_ids": "[1,2,3,4,5,6,7,8]",
"recipients_count": 8,
"started_at": null,
"last_message_sent_at": null,
"finished_at": null,
"author": 1,
"created_at": "2018-02-19T13:01:41.097096Z",
"updated_at": "2018-02-19T13:01:41.097126Z"
}