logo

Tags

อัพเดทล่าสุด :2022-12-28

Create

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

POST
          POST

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/json; charset=utf-8
          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" }'
          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", } }
          {
    "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" }
          {
    "code": 30000,
    "message": "Authentication failed"
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Delete

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

DELETE
          DELETE

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/x-www-form-urlencoded;charset=utf-8
          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
          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 }
          {
   "count": 1
 }

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Response-Error

{ "code": 30036, "message": "resource not found" }
          {
    "code": 30036,
    "message": "resource not found"
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Update

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

PUT
          PUT

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/json; charset=utf-8
          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" }'
          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 }
          {
   "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" }
          {
    "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
          https://email.api.engagelab.cc/v1/marketing/lists/tags

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

GET
          GET

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/x-www-form-urlencoded;charset=utf-8
          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
          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 }
          {
  "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" }
          {
    "code": 30000,
    "message": "Authentication failed"
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Member add tags

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

POST
          POST

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/json; charset=utf-8
          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" ] }'
          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 }
          {
 "count": 2
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Response-Error

HttpStatus: 401

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Member remove tags

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

POST
          POST

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/json; charset=utf-8
          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" ] }'
          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 }
          {
    "count": 1
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HttpStatus: 401

Response-Error

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Get members

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP request method

GET
          GET

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Content-Type

application/x-www-form-urlencoded;charset=utf-8
          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
          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
email 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 }
          {
    "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" }
          {
    "code": 30000,
    "message": "Authentication failed"
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย
在文档中心打开
icon
ติดต่อฝ่ายขาย