Everything about SMS Campaign
You can post to a list with up to 20000 recipients
with each API call. You can only send to a single list containing up to 20,000 recipients. The response is far less detailed than the normal Send SMS endpoint. Use the SMS Send endpoint if you would like to send to less than 1000 recipients at once.
You are required to add an opt-out message to the end of your message body if you are sending marketing message. This can be in the form of asking users to reply STOP to opt-out or by including StopMsg.me/xxxxx
which is a placeholder that will add a link that can be clicked to out-out.
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
list_id | integer(int32) | true | none | Your list id. |
name | string | true | none | Your campaign name. |
body | string | true | none | Your campaign message. |
from | string | true | yes | Your sender id |
schedule | integer(int32) | false | none | Your schedule timestamp. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "list_id": "{{listId}}",
- "name": "My Campaign",
- "from": "+6141111111",
- "body": "Hey (First Name), I want to ask if this is your lastname: (Last Name)? Visit http://smsg.io/xxxxx for more details.",
- "subject": "New sms campaign test"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your new campaign has been added.",
- "data": {
- "sms_campaign_id": 7,
- "name": "My Campaign 1",
- "user_id": 1,
- "subaccount_id": 1,
- "list_id": 428,
- "from": "+61353787448",
- "body": "This is my new campaign message. StopMsg.me/xxxxx",
- "schedule": "1444821615",
- "status": "Queued",
- "date_added": "1444962630",
- "ip_address": "192.168.10.1",
- "custom_string": null,
- "source": null,
- "_total_count": 10
}
}
Calculate price for sms campaign
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
list_id | integer(int32) | true | none | Your list id. |
name | string | true | none | Your campaign name. |
body | string | true | none | Your campaign message. |
from | string | true | yes | Your sender id |
schedule | integer(int32) | false | none | Your schedule timestamp. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "list_id": "{{listId}}",
- "name": "My Campaign",
- "from": "+61411111111",
- "body": "Hey (First Name), I want to ask if this is your lastname: (Last Name)?"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your price for your SMS Campaign.",
- "data": {
- "total_count": 1,
- "total_price": "0.035",
- "data": {
- "from": "+61353787448",
- "body": "John, this is your new campaign message.",
- "schedule": "1444381346"
}, - "_currency": {
- "currency_name_short": "AUD",
- "currency_prefix_d": "$",
- "currency_prefix_c": "c",
- "currency_name_long": "Australian Dollars"
}
}
}
Update sms campaign
Parameter | In | Type | Required | Description |
---|---|---|---|---|
sms_campaign_id | path | integer(int32) | true | ID of SMS campaign to update |
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
list_id | integer(int32) | true | none | Your list id. |
name | string | true | none | Your campaign name. |
body | string | true | none | Your campaign message. |
from | string | true | yes | Your sender id |
schedule | integer(int32) | false | none | Your schedule timestamp. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "list_id": "{{listId}}",
- "name": "My Campaign2",
- "from": "+61411111111",
- "body": "Hey (First Name), I want to ask if this is your lastname: (Last Name)?"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your SMS Campaign has been updated.",
- "data": {
- "sms_campaign_id": 7,
- "name": "My Campaign 1",
- "user_id": 1,
- "subaccount_id": 1,
- "list_id": 428,
- "from": "+61353787448",
- "body": "This is my new campaign message. StopMsg.me/xxxxx",
- "schedule": "1444821615",
- "status": "Queued",
- "date_added": "1444962630",
- "ip_address": "192.168.10.1",
- "custom_string": null,
- "source": null,
- "_total_count": 10
}
}
Get specific sms campaign
Parameter | In | Type | Required | Description |
---|---|---|---|---|
sms_campaign_id | path | integer(int32) | true | ID of SMS campaign to retrieve |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/sms-campaigns/{sms_campaign_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your SMS Campaign.",
- "data": {
- "sms_campaign_id": 7,
- "name": "My Campaign 1",
- "user_id": 1,
- "subaccount_id": 1,
- "list_id": 428,
- "from": "+61353787448",
- "body": "This is my new campaign message. StopMsg.me/xxxxx",
- "schedule": "1444821615",
- "status": "Queued",
- "date_added": "1444962630",
- "ip_address": "192.168.10.1",
- "custom_string": null,
- "source": null,
- "_total_count": 10
}
}
Cancel sms campaign
Parameter | In | Type | Required | Description |
---|---|---|---|---|
sms_campaign_id | path | integer(int32) | true | ID of SMS Campaign to cancel |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "list_id": "{{listId}}",
- "name": "My Campaign2",
- "from": "+61411111111",
- "body": "Hey (First Name), I want to ask if this is your lastname: (Last Name)?"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your SMS Campaign has been cancelled.",
- "data": {
- "sms_campaign_id": 7,
- "name": "My Campaign 1",
- "user_id": 1,
- "subaccount_id": 1,
- "list_id": 428,
- "from": "+61353787448",
- "body": "This is my new campaign message. StopMsg.me/xxxxx",
- "schedule": "1444821615",
- "status": "Queued",
- "date_added": "1444962630",
- "ip_address": "192.168.10.1",
- "custom_string": null,
- "source": null,
- "_total_count": 10
}
}
Get list of sms campaigns
Parameter | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer(int32) | false | Page number |
limit | query | integer(int32) | false | Number of records per page |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/sms-campaigns'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your SMS campaigns.",
- "data": [
- {
- "sms_campaign_id": 1,
- "name": "This is my awesome campaign.",
- "user_id": 1,
- "subaccount_id": 1,
- "list_id": 1,
- "from": "+61353787447",
- "body": "This is my new campaign message.",
- "schedule": "1444821615",
- "status": "Cancelled",
- "date_added": "1444962803",
- "ip_address": "192.168.10.1",
- "custom_string": null,
- "source": null,
- "_total_count": 10
}, - {
- "sms_campaign_id": 7,
- "name": "My Campaign 1",
- "user_id": 1,
- "subaccount_id": 1,
- "list_id": 1,
- "from": "+61353787448",
- "body": "This is my new campaign message.",
- "schedule": "1444821615",
- "status": "Queued",
- "date_added": "1444962630",
- "ip_address": "192.168.10.1",
- "custom_string": null,
- "source": null,
- "_total_count": 10
}
]
}