Create an engagement task that uses a self-defined custom message instead of predefined message templates from TikTok Shop. The task 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The name of the task. Length: 1–256 bytes when UTF-8 encoded.
The time at which the task ends, and messages will no longer be sent. Unix timestamp (seconds).
The engagement channel. Only TIKTOK_IM is supported.
The product IDs that you want to include as interactive cards in the message. Retrieve this value from the Search Products API. Max count: 4
The coupon IDs that you want to include as interactive cards in the message. Max count: 1 You can only add coupons that have one of these sets of property:
coupons.display_type=REGULARandcoupons.target_buyer_segment=ALLcoupons.display_type=REGULARandcoupons.target_buyer_segment=REPEAT_CUSTOMERS. Find out the coupon ID and properties from the Search Coupons API.
The custom message to send to customers.
object
The message title.
- Valid format: plain text, unicode emoji (UTF-8)
- Valid length: 1–70 Unicode code points.
The message body.
- Valid format: plain text, unicode emoji (UTF-8)
- Valid length: 1–500 Unicode code points.
Examplegenerated
{ "task_name": "example", "end_time": 1, "channel": "example", "product_ids": [ "example" ], "coupon_ids": [ "example" ], "custom_message": { "title": "example", "body": "example" }}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
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.
Example
{ "code": 0, "data": { "task_id": "475910475643" }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}