SMS contact List Member
You can query, add, update and delete members in SMS contact list through the following interfaces.
Query members in contact list
Return to the basic information of the member in contact list
URL
https://api.sendcloud.net/smsapi/smsContactListMember/list
HTTP Request Method
post get
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
smsUser | string | yes | smsUser |
contactListName | string | yes | contact list name |
phone | string | no | phone numbers of members |
userName | string | no | user names of members |
start | Integer | no | start position, [0-], defaults to 0 |
limit | Integer | no | amount, [0-100],defaults to 100 |
signature | string | yes | signature, validity verification |
Request Example
https://api.sendcloud.net/smsapi/smsContactListMember/list?smsUser=***&contactName=***&phone=***&vars=***&signature=***
Returned value description
parameter | description |
---|---|
id | member ID |
contactlistId | contact list ID |
phone | phone numbers of members |
userName | user names of members |
vars | variables |
createTime | time of creating contact list |
Returned value example
{
"result": true,
"statusCode": 200,
"message": "查询成功",
"info": {
"total": 102,
"count": 2,
"contactMemberList": [{
"contactlistId": 999,
"createTime": "2016-10-18 15:13:27",
"id": 440164,
"phone": "18********",
"userName": "",
"vars": "{\"name\":\"hello\"}"
}, {
"contactlistId": 999,
"createTime": "2016-10-18 15:13:27",
"id": 440165,
"phone": "15********",
"userName": "",
"vars": "{\"name\":\"world\"}"
}
]
}
}
Add or update members in contact list(Batch add phone)
URL
https://api.sendcloud.net/smsapi/smsContactListMember/batchSaveOrUpdate
HTTP Request Method
post get
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
smsUser | string | yes | smsUser |
contactListName | string | yes | name of the contact list |
phone | string | yes | Member phone list (up to 100 calls) to; division |
userName | string | no | user names of members |
vars | string | yes | variables list |
signature | string | yes | signature, validity verification |
Tips:
- If the userNames list has a value, the number of data (in); The number of data to be split with the phones list (in); Split) same.
- If the vars list has a value, the number of data (in); The number of data to be split with the phones list (in); (2) same;
- If the userNames list has a value, the value in the userNames list is the same as the value in the phones list; The position after segmentation is one-to-one corresponding
- If the vars list has a value, the value in the vars list is the same as the value in the phones list; After segmentation, the position is one-to-one corresponding
- If the phone verification fails, this record will not be stored or updated
- If the phone passes the verification, the corresponding username has a value, but the verification fails. This record will not be stored or updated
- If the phone passes the verification, the corresponding vars has a value, but the verification fails. This record will not be stored or updated
- When all records hit 5, 6 and 7, resulting in no valid warehousing or update records, an error is returned to the interface caller
- userNames : A single name can be up to 48 characters in order to; Split, corresponding to the number and location of phones list. For example: usernames = Zhang San; Li Si
- vars : The maximum length of a single variable is 1023 characters, in order to; Split, corresponding to the number and location of phones list. For example: vars = {"sex": "male"}{“ Sex ":" female "}
Returned value description
parameter | description |
---|---|
id | member ID |
contactlistId | contact list ID |
phone | phone numbers of members |
userName | user names of members |
vars | variables |
createTime | time of creating contact list |
Returned value example
{
"result": true,
"statusCode": 200,
"message": "成功",
"info": {
"contactMemberList": [
{
"contactlistId": 213,
"createTime": "2021-07-13 16:41:51",
"id": 4421350,
"phone": "13546523897",
"userName": "lisi",
"vars": "{\"sex\":\"女\"}"
},
{
"contactlistId": 213,
"createTime": "2021-07-13 16:41:51",
"id": 4421351,
"phone": "13964578911",
"userName": "zhangsan",
"vars": "{\"sex\":\"男\"}"
}
],
"count": 2
}
}
Add or update members in contact list
Return to added or updated members
URL
https://api.sendcloud.net/smsapi/smsContactListMember/saveOrUpdate
HTTP Request Method
post get
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
smsUser | string | yes | smsUser |
contactListName | string | yes | name of the contact list |
phone | string | yes | phone numbers of members |
userName | string | no | user names of members |
vars | string | yes | variables |
signature | string | yes | signature, validity verification |
Tips:
- If phone number already exists, the record will be updated; if no phone number, the data will be added as new.
Request Example
https://api.sendcloud.net/smsapi/smsContactListMember/saveOrUpdate?smsUser=***&contactName=***&phone=***&userName=***&vars=**&signature=***
Returned value description
parameter | description |
---|---|
id | member ID |
contactlistId | contact list ID |
phone | phone numbers of members |
userName | user names of members |
vars | variables |
createTime | time of creating contact list |
Returned value example
{
"result": true,
"statusCode": 200,
"message": "保存成功",
"info": {
"contactMember": {
"contactlistId": 39,
"createTime": "2017-05-19 14:09:16",
"id": 440303,
"phone": "18971138295",
"userName": "101",
"vars": "{101}"
}
}
}
Delete members in contact list
Return to check whether the member has been deleted
URL
https://api.sendcloud.net/smsapi/smsContactListMember/delete
HTTP Request Method
post get
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
smsUser | string | yes | smsUser |
contactListName | string | yes | contact list name |
phone | string | yes | phone numbers of members |
signature | string | yes | signature, validity verification |
Request Example
https://api.sendcloud.net/smsapi/smsContactListMember/delete?smsUser=***&contactName=***&phone=***&signature=***
Returned value example
{
"result": true,
"statusCode": 200,
"message": "删除成功",
"info": {}
}