Logo Site EngageLab Full Black
Contact Sales

Campaign Tag Management

Endpoint

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
              
              https://email.api.engagelab.cc/v1/marketing/campaigns/tags

            
This code block in the floating window

HTTP Method

POST
              
              POST

            
This code block in the floating window

Content-Type

application/json; charset=utf-8
              
              application/json; charset=utf-8

            
This code block in the floating window

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:

  1. Each organization can create up to 100 tags.

  2. 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"] }'
              
              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"]
}'

            
This code block in the floating window

Response Example

Response-Success

HttpStatus: 200

{ "count": 2 }
              
              {
    "count": 2
}

            
This code block in the floating window

Response-Error

HttpStatus: 401

{ "code": 32603, "message": "tag name already exist" }
              
              {
    "code": 32603,
    "message": "tag name already exist"
}

            
This code block in the floating window

Campaign Tag List

URL

https://email.api.engagelab.cc/v1/marketing/campaigns/tags
              
              https://email.api.engagelab.cc/v1/marketing/campaigns/tags

            
This code block in the floating window

HTTP Method

GET
              
              GET

            
This code block in the floating window

Content-Type

application/x-www-form-urlencoded;charset=utf-8
              
              application/x-www-form-urlencoded;charset=utf-8

            
This code block in the floating window

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
              
              curl -X GET -H 'Authorization:Basic  YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/campaigns/tags?tag_name=Promotion&limit=10&offset=0

            
This code block in the floating window

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 }
              
              {
    "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
}

            
This code block in the floating window

Response-Error

HttpStatus: 401

{ "code": 30000, "message": "Authentication failed" }
              
              {
    "code": 30000,
    "message": "Authentication failed"
}

            
This code block in the floating window

Update Campaign Tag

URL

https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}
              
              https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}

            
This code block in the floating window

HTTP Method

PUT
              
              PUT

            
This code block in the floating window

Content-Type

application/json; charset=utf-8
              
              application/json; charset=utf-8

            
This code block in the floating window

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" }'
              
              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"
}'

            
This code block in the floating window

Response Example

Response-Success

HttpStatus: 200

{ "count": 1 }
              
              {
    "count": 1
}

            
This code block in the floating window

Response-Error

HttpStatus: 401

{ "code": 32605, "message": "Campaign tag not found" }
              
              {
    "code": 32605,
    "message": "Campaign tag not found"
}

            
This code block in the floating window

Delete Campaign Tag

URL

https://email.api.engagelab.cc/v1/marketing/campaigns/tags
              
              https://email.api.engagelab.cc/v1/marketing/campaigns/tags

            
This code block in the floating window

HTTP Method

DELETE
              
              DELETE

            
This code block in the floating window

Content-Type

application/x-www-form-urlencoded;charset=utf-8
              
              application/x-www-form-urlencoded;charset=utf-8

            
This code block in the floating window

Request Headers

Header Type Required Description
Authorization string true Basic base64(api_user:api_key)

Notes:

  1. 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
              
              curl -X DELETE -H 'Authorization:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/campaigns/tags/61c2be010d2b4e6a3836ab1f

            
This code block in the floating window

Response Example

Response-Success

HttpStatus: 200

{ "count": 2 }
              
              {
    "count": 2
}

            
This code block in the floating window

Response-Error

HttpStatus: 401

{ "code": 32606, "message": "tag_id cannot be empty" }
              
              {
    "code": 32606,
    "message": "tag_id cannot be empty"
}

            
This code block in the floating window

Add Tags to Campaigns

URL

https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}/add
              
              https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}/add

            
This code block in the floating window

HTTP Method

POST
              
              POST

            
This code block in the floating window

Content-Type

application/json; charset=utf-8
              
              application/json; charset=utf-8

            
This code block in the floating window

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:

  1. 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" ] }'
              
              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"
  ]
}'

            
This code block in the floating window

Response Example

Response-Success

HttpStatus: 200

{ "total": 3 }
              
              {
    "total": 3
}

            
This code block in the floating window

Response-Error

HttpStatus: 401

{ "code": 32605, "message": "Campaign tag not found" }
              
              {
    "code": 32605,
    "message": "Campaign tag not found"
}

            
This code block in the floating window

Remove Tags from Campaigns

URL

https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}/remove
              
              https://email.api.engagelab.cc/v1/marketing/campaigns/tags/{tag_id}/remove

            
This code block in the floating window

HTTP Method

POST
              
              POST

            
This code block in the floating window

Content-Type

application/json; charset=utf-8
              
              application/json; charset=utf-8

            
This code block in the floating window

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:Basic YXBpX3VzZXI6YXBpX2tleQ==' -i https://email.api.engagelab.cc/v1/marketing/campaigns/tags/616683a13a7b531b0336108d/remove --data '{ "campaign_ids": [ "61c2be010d2b4e6a3836ab1f", "61c2be010d2b4e6a3836ab1d" ] }'
              
              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/616683a13a7b531b0336108d/remove --data '{
  "campaign_ids": [
    "61c2be010d2b4e6a3836ab1f",
    "61c2be010d2b4e6a3836ab1d"
  ]
}'

            
This code block in the floating window

Response Example

Response-Success

HttpStatus: 200

{ "total": 3 }
              
              {
    "total": 3
}

            
This code block in the floating window

Response-Error

HttpStatus: 401

{ "code": 32605, "message": "Campaign tag not found" }
              
              {
    "code": 32605,
    "message": "Campaign tag not found"
}

            
This code block in the floating window
Icon Solid Transparent White Qiyu
Contact Sales