Tags
Create
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags
HTTP request method
POST
Content-Type
application/json; charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | true | Tag name, up to 64 characters, only composed of a-z,A-z,0-9,_, Chinese characters, etc. |
Request-Example
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/lists/tags --data '{
"name": "myCustomTag"
}'
Response example
Response-Success
HttpStatus:200
{
"result":{
"tag_id": "62732d3ddd017d22ccd118e4",
"tag_name": "education",
"create_time": "2023-11-28T11:14:48+0800",
"update_time": "2023-11-28T11:14:48+0800",
}
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
Delete
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags/{tag_id}
HTTP request method
DELETE
Content-Type
application/x-www-form-urlencoded;charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Request-Example
curl -X DELETE -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/lists/tags/61c2be010d2b4e6a3836ab1f
Response example
Response-Success
HttpStatus: 200
{
"count": 1
}
Response-Error
{
"code": 30036,
"message": "resource not found"
}
Update
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags/{tag_id}
HTTP request method
PUT
Content-Type
application/json; charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | false | Tag name, up to 64 characters long, consisting only of a-z,A-z,0-9,_, Chinese characters, etc. |
Request-Example
curl -X PUT -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://api2.sendcloud.net/marketing/lists/tags/617a71ac672b2823a1a82c13 61c2be010d2b4e6a3836ab1f --data '{
"name": "myCustomTag"
}'
Response example
Response-Success
HttpStatus: 200
{
"count": 1
}
Response-Error
HttpStatus: 400
{
"code": 30035,
"message": "Tag name only consists of a-z, A-z, 0-9, _,chinese character, up to 64 characters"
}
Tags list
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags
HTTP request method
GET
Content-Type
application/x-www-form-urlencoded;charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Query-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
name | string | false | Query tag name (supports fuzzy query) |
offset | integer | false | Query starting position, value range [0-], default is 0 |
limit | integer | false | Query number, value range [1-100], default is 10 |
Request-Example
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/lists/tags?offset=0&limit=10&name=education
Response-Parameters
Parameters | Type | Description |
---|---|---|
result | array[object] | Tag List |
tag_id | string | Tag ID |
name | string | Tag Name |
create_time | string | Creation Time |
update_time | string | Update Time |
count | integer | Number of members with Tag |
total | integer | Total Number of Records |
count | integer | Number of Returned Records |
Response example
Response-Success
HttpStatus: 200
{
"result": [
{
"tag_id": "617a71ac672b2823a1a82c13",
"tag_name": "education",
"create_time": "2023-11-28T11:14:48+0800",
"update_time":"2023-11-28T11:14:48+0800",
"count": 1,
}
],
"count": 1,
"total": 1
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
Member add tags
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags/{tag_id}/add
HTTP request method
POST
Content-Type
application/json; charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Basic base64(api_user:api_key) |
Body-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
member_ids | string[] | true | Member ID list, maximum 1000 member IDs at a time |
Request-Example
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/lists/tags/61c2be010d2b4e6a3836ab1f/add --data '{
"member_ids": [
"61c2be010d2b4e6a3836ab1f",
"61c2be010d2b4e6a3836ab1d"
]
}'
Response example
Response-Success
HttpStatus: 200
{
"count": 2
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
Member remove tags
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags/{tag_id}/remove
HTTP request method
POST
Content-Type
application/json; charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Bearer Token |
Body-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
member_ids | array[string] | true | Member ID list, maximum 1000 member IDs at a time |
Request-Example
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Bearer YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/lists/tags/ 616683a13a7b531b0336108d/remove --data '{
"memberIds": [
"61c2be010d2b4e6a3836ab1f",
"61c2be010d2b4e6a3836ab1d"
]
}'
Response example
Response-Success
HttpStatus:200
{
"count": 1
}
HttpStatus: 401
Response-Error
{
"code": 30000,
"message": "Authentication failed"
}
Get members
URL
https://email.api.engagelab.cc/v1/marketing/lists/tags/{tag_id}/members
HTTP request method
GET
Content-Type
application/x-www-form-urlencoded;charset=utf-8
Request-Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | true | Bearer Token |
Query-Parameters
Parameter | Type | Required | Description |
---|---|---|---|
offset | integer | false | Query starting position, value range [0-], default is 0 |
limit | integer | false | Query number, value range [1-100], default is 10 |
Request-Example
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/lists/tags/616683a13a7b531b0336108d/members?offset=0&limit= 10
Response-Parameters
parameters | Type | Description |
---|---|---|
result | object | Member List |
member_id | string | Member ID |
list_id | integer | List ID |
string | Email Address | |
phone | string | Phone Number |
name | string | Name |
create_time | string | Creation Time (UTC+8) |
update_time | string | Update Time (UTC+8) |
unsubscribe_time | string | Unsubscribe Time (UTC+8) |
fields | object | Member fields |
tag_ids | array[string] | Tag IDs Set |
tag_names | array[string] | Tag Names Set |
total | integer | Total Records Matching Query |
Response example
Response-Success
HttpStatus: 200
{
"result": [
{
"member_id": "6565c12a3b4e0d83d3f58ea0",
"list_id": 95964,
"email": "xjmfc@126.com",
"phone": null,
"name": null,
"fields": {
"Birthday": "03/30",
"Age": "12"
},
"tag_ids": [
"646f28a7cac6587565ad6918"
],
"tag_names": [
"test"
],
"create_time": "2023-11-28T18:30:02+0800",
"update_time": "2023-11-30T16:42:11+0800",
"unsubscribe_time": null
}
],
"total": 2,
"count": 1
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}