Skip to content

Create Engagement Task

POST
/customer_engagement/202412/engagement_tasks

Create an engagement task that acts as a container for grouping messages with similar content and rules, allowing sellers to track and compare task performance across different types of content. Note that each task has a mandatory end time, and once expired, it cannot be used to send additional messages.

shop_cipher
required
string

Identifies the shop. Obtain it from the Get Authorized Shops API.

idempotency_key
required
string

A unique key to recognize a request and prevent duplicate processing of the same request, especially in cases of connection issues. Ensure this key is unique for each request to avoid accidental duplicates. Note: We recommend that you generate v4 UUIDs for use as keys.

Media typeapplication/json
object
template_id
required

The ID of engagement message templates predefined by TikTok Shop. Retrieve the value from Get Message Templates.

string
task_name
required

The name of the task. Length: 1–256 bytes.

string
end_time
required

The time at which the task ends, and messages will no longer be sent. Unix timestamp (seconds).

integer format: int64
channel
required

The engagement channel. Only TIKTOK_IM is supported.

string
product_ids

The product ID. Retrieve this value from the Search Products API.

Array<string>
coupon_ids

The coupon ID. Retrieve this value and other coupon-related information from the Search Coupons API.

Note: The coupon properties must comply with the rules defined in coupon_card_rules.coupon_type of the Get Message Templates API.

Array<string>
Examplegenerated
{
"template_id": "example",
"task_name": "example",
"end_time": 1,
"channel": "example",
"product_ids": [
"example"
],
"coupon_ids": [
"example"
]
}

Success

Media typeapplication/json
object
code

Status code; 0 means success.

integer format: int64
message

Success or failure message.

string
request_id

Request log ID.

string
data
object
task_id

The unique identifier for the customer engagement task. Pass this value in the Send Engagement Message API to associate the task with the message sending operation.

string
Example
{
"code": 0,
"data": {
"task_id": "475910475643"
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}