# Email Label
Label provides another way to get stats of emails.
You can query, add, delete and modify labels with API.
# Query (Batch Query)
List of returned labels
URL
https://api2.sendcloud.net/api/label/list
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
query | string | no | key word of fuzzy query |
start | int | no | start position, [0-], defaults to 0 |
limit | int | no | amount, [0-100],defaults to 100 |
Request Example
https://api2.sendcloud.net/api/label/list?apiUser=***&apiKey=***&query=edm&start=0&limit=200
1
Returned Value Description
parameter | description |
---|---|
labelId | label ID |
labelName | label name |
gmtCreated | time of label creation |
gmtModified | time of label modification |
Returned Value Example
{
"info": {
"dataList": [
{
"gmtCreated": "2014-08-06 16:18:22",
"gmtUpdated": "2014-08-06 16:18:22",
"labelId": ***,
"labelName": "***"
},
{
"gmtCreated": "2014-08-06 15:13:28",
"gmtUpdated": "2014-08-06 15:13:28",
"labelId": ***,
"labelName": "***"
}
],
"total": 21,
"count": 2
},
"statusCode": 200,
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Query
URL
https://api2.sendcloud.net/api/label/get
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
labelId | int | yes | label ID |
Request Example
https://api2.sendcloud.net/api/label/get?apiUser=***&apiKey=***&labelId=89
1
Returned Value Description
parameter | description |
---|---|
labelId | label ID |
labelName | label name |
gmtCreated | time of label creation |
gmtModified | time of label modification |
Returned Value Example
{
"info": {
"data": {
"gmtCreated": "2014-08-06 16:18:22",
"gmtUpdated": "2014-08-06 16:18:22",
"labelId": ***,
"labelName": "***"
}
},
"statusCode": 200,
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# Add
URL
https://api2.sendcloud.net/api/label/add
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
labelName | string | yes | label name to be added |
Tips:
- The upper limit of label creation is 100000
Request Example
https://api2.sendcloud.net/api/label/add?apiUser=***&apiKey=***&labelName=test
1
Returned Value Description
parameter | description |
---|---|
labelId | label ID |
labelName | label name |
Returned Value Example
{
"statusCode": 200,
"info": {
"data": {
"gmtCreated": "2015-10-19 15:39:27",
"gmtUpdated": "2015-10-19 15:39:27",
"labelId": ***,
"labelName": "test"
}
},
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# Delete
URL
https://api2.sendcloud.net/api/label/delete
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
labelId | int | yes | label ID to be deleted |
Request Example
https://api2.sendcloud.net/api/label/delete?apiUser=***&apiKey=***&labelId=89
1
Returned Value Description
parameter | description |
---|---|
count | amount of deleted labels |
Returned Value Example
{
"statusCode": 200,
"info": {
"count": 1
},
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# Modify
URL
https://api2.sendcloud.net/api/label/update
1
HTTP Request Method
post get
1
Parameter Description
parameter | type | type | description |
---|---|---|---|
apiUser | string | yes | API_USER |
apiKey | string | yes | API_KEY |
labelId | int | yes | label ID to be modified |
labelName | string | yes | new label name |
Request Example
https://api2.sendcloud.net/api/label/update?apiUser=***&apiKey=***&labelId=89&labelName=testnew
1
Returned Value Description
parameter | description |
---|---|
count | count of modified labels |
Returned Value Example
{
"statusCode": 200,
"info": {
"count": 1
},
"message": "request was successful",
"result": true
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8