...
You can perform GET, POST, DELETE on /lists/{List_ID}/listsecret resource, Basic Authentication is required.
You can use GET method to check if a ListSecret is already configured (if not, you should use POST method)
Expandexpand |
---|
title | GET - Read ListSecret |
---|
|
Code Block |
---|
language | groovy | title |
---|
GET - Read ListSecretcollapse | true |
| -- Request
GET https://sendsms.mailup.com/api/v2.0/lists/1/listsecret HTTP/1.1
User-Agent: Fiddler
Authorization: Basic aBcDeFgHiLmNoPqRsTuVz
Host: sendsms.mailup.com
Content-Length: 0
-- Response 1 (when ListSecret does not exist)
HTTP/1.1 200 OK
Content-Length: 71
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 09 Mar 2016 16:39:24 GMT
{"Data":{"ListSecret":null},"Code":"0","Description":"","State":"DONE"}
-- Response 2 (when ListSecret exists)
HTTP/1.1 200 OK
Content-Length: 105
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 09 Mar 2016 16:45:39 GMT
{"Data":{"ListSecret":""yyyyyyyy-ddd-eeee-ffff-3e1cb0e6e64c"},"Code":"0","Description":"","State":"DONE"} |
|
As soon as you get the value of ListSecret you can start sending text messages (refer to next paragraph).
Expand |
code |
---|
|
language | groovy |
---|
title | POST - Create ListSecret |
---|
| Code Block |
---|
| POST https://sendsms.mailup.com/api/v2.0/lists/{List_ID}/listsecret HTTP/1.1
User-Agent: Fiddler
Authorization: Basic aBcDeFgHiLmNoPqRsTuVz
Host: sendsms.mailup.com
Content-Length: 55
Content-Type: application/json;odata=verbose;charset=utf-8
{
"ListGUID":"xxxxxxxx-aaa-bbbb-cccc-e3a98b626156"
} |
|
If you want to disable transactional APIs, you can use DELETE method, which can also be used, when followed by a POST method, to change the ListSecret value
...
Expand |
---|
title | DELETE - Remove ListSecret |
---|
|
Code Block |
---|
| DELETE | - Remove ListSecretDELETE https://sendsms.mailup.com/api/v2.0/lists/1/listsecret?listGUID=xxxxxxxx-aaa-bbbb-cccc-e3a98b626156 HTTP/1.1
User-Agent: Fiddler
Authorization: Basic aBcDeFgHiLmNoPqRsTuVz
Host: sendsms.mailup.com
Content-Length: 0 |
|
You can use GET method to check if a ListSecret is already configured (if not, you should use POST method)
As soon as you get the value of ListSecret you can start sending text messages (refer to next paragraph).
If you want to disable transactional APIs, you can use DELETE method, which can also be used, when followed by a POST method, to change the ListSecret value
How to send an SMS
Once you have ListSecret, you can start sending text messages and authentication is no more required. The example below sends an SMS to number +393350000001
...