Campaign Tag Management
Endpoint
| Data Center | URL |
|---|---|
| Singapore | https://email.api.engagelab.cc |
| Turkey | https://emailapi-tr.engagelab.com |
When using the REST API, combine the selected base URL with the path of the specific API to obtain the complete endpoint URL.
POST/v1/marketing/campaigns/tags
Create Campaign Tags
URL
https://email.api.engagelab.cc/v1/marketing/campaigns/tags
HTTP 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 |
|---|---|---|---|
| tag_names | array[string] | true | Tag names. Maximum length: 64 characters. Only a-z, A-Z, 0-9, _, Chinese characters, etc. are supported. |
Notes:
Each organization can create up to 100 tags.
Tag names must be unique.
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/campaigns/tags --data '{
"tag_names": ["myCustomTag", "New Users"]
}'
Response Example
Response-Success
HttpStatus: 200
{
"count": 2
}
Response-Error
HttpStatus: 401
{
"code": 32603,
"message": "tag name already exist"
}
Campaign Tag List
URL
https://email.api.engagelab.cc/v1/marketing/campaigns/tags
HTTP 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 |
|---|---|---|---|
| tag_name | string | false | Tag name (fuzzy search) |
| offset | integer | false | Record offset. Value range: [0-]. Default: 0 |
| limit | integer | false | Number of records to retrieve. Value range: [1-100]. Default: 10 |
Request Example
curl -X GET -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/campaigns/tags?tag_name=Promotion&limit=10&offset=0
Response Fields
| Parameter | Type | Description |
|---|---|---|
| tag_id | string | Tag ID |
| tag_name | string | Tag name |
| create_time | string | Creation time |
| update_time | string | Update time |
Response Example
Response-Success
HttpStatus: 200
{
"result": [
{
"tag_id": "64a1f2e0c9e1a23456789012",
"tag_name": "myCustomTag",
"create_time": "2024-01-15T10:30:00+0800",
"update_time": "2024-01-16T14:20:00+0800"
},
{
"tag_id": "64a1f2e0c9e1a23456789013",
"tag_name": "New Users",
"create_time": "2024-01-14T08:00:00+0800",
"update_time": "2024-01-14T08:00:00+0800"
}
],
"total": 2,
"count": 2
}
Response-Error
HttpStatus: 401
{
"code": 30000,
"message": "Authentication failed"
}
Update Campaign Tag
URL
https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}
HTTP Method
PUT
Content-Type
application/json; charset=utf-8
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | true | Basic base64(api_user:api_key) |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| tag_id | string | true | Tag ID |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| tag_name | string | true | Tag name. Only Chinese characters, uppercase and lowercase English letters, digits, and underscores are supported. Length: 1-64 characters. |
Request Example
curl -X PUT -H 'Content-Type: application/json; charset=utf-8' -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/campaigns/tags/64a1f2e0c9e1a23456789012 --data '{
"tag_name": "myCustomTag"
}'
Response Example
Response-Success
HttpStatus: 200
{
"count": 1
}
Response-Error
HttpStatus: 401
{
"code": 32605,
"message": "Campaign tag not found"
}
Delete Campaign Tag
URL
https://email.api.engagelab.cc/v1/marketing/campaigns/tags
HTTP 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) |
Notes:
- After a tag is deleted, the associated campaigns will automatically have the tag removed.
Request Example
curl -X DELETE -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/campaigns/tags/61c2be010d2b4e6a3836ab1f
Response Example
Response-Success
HttpStatus: 200
{
"count": 2
}
Response-Error
HttpStatus: 401
{
"code": 32606,
"message": "tag_id cannot be empty"
}
Add Tags to Campaigns
URL
https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}/add
HTTP 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 |
|---|---|---|---|
| campaign_ids | array[string] | * | Campaign ID list. Up to 200 IDs per request. |
Notes:
- Each campaign can have up to 20 tags.
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/campaigns/tags/61c2be010d2b4e6a3836ab1f/add --data '{
"campaign_ids": [
"61c2be010d2b4e6a3836ab1f",
"61c2be010d2b4e6a3836ab1d"
]
}'
Response Example
Response-Success
HttpStatus: 200
{
"total": 3
}
Response-Error
HttpStatus: 401
{
"code": 32605,
"message": "Campaign tag not found"
}
Remove Tags from Campaigns
URL
https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}/remove
HTTP 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 |
|---|---|---|---|
| campaign_ids | array[string] | * | Campaign ID list. Up to 200 IDs per request. |
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/campaigns/tags/616683a13a7b531b0336108d/remove --data '{
"campaign_ids": [
"61c2be010d2b4e6a3836ab1f",
"61c2be010d2b4e6a3836ab1d"
]
}'
Response Example
Response-Success
HttpStatus: 200
{
"total": 3
}
Response-Error
HttpStatus: 401
{
"code": 32605,
"message": "Campaign tag not found"
}










