Use this API to send a message to the buyer in a conversation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Conversation ID
Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Message type. Possible enumerations:
TEXTIMAGEVIDEOPRODUCT_CARDORDER_CARDRETURN_REFUND_CARDCOUPON_CARDLOGISTICS_CARD
Message content, in JSON serialized string.
Examples of content for each type of message are listed below:
-
TEXT: { “content”: “hi, I want to get refunded.” } (Note: Max 2000 characters. Do not use sensitive words that violate TikTok Shop terms & policies.)
-
VIDEO { “vid”: “v10394g5000cd499vc7og65mqn3r3dg0” }
-
LOGISTICS_CARD { “order_id”: “580874485811283206”, “package_id”: “123456” // Optional (recommended for one order with multiple packages; not required for one order with one package) }
-
PRODUCT_CARD { “product_id”: “7494560109732334265” }
-
ORDER_CARD: { “order_id”: “7494560109732334267” }
-
RETURN_REFUND_CARD: { “order_id”: “7494560109732334267”, “sku_id”: “7494560109732363423” } Note: The order of the RETURN_REFUND_CARD to send must meet after-sale conditions. To check the eligibility, use Get Aftersale Eligibility.
-
IMAGE: { “url”:“https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/2ca53c34ad8443e6b39f4e0153d3aed4~tplv-o3syd03w52-origin-image.image?from=1320446476”, “width”: 1280, “height”: 720 }
Note: You can get the value of url by calling Upload Buyer Messages Image.
- COUPON_CARD: { “coupon_id”: “7262992004278206762” } Note: Coupons that can be sent in a message must meet all the following conditions:
display_type==CHATordisplay_type==REGULARstatus==ONGOINGcreation_source==SELLER_CENTERtarget_buyer_segment!=REPEAT_CUSTOMERS
Message sending role.
- ‘CUSTOMER_SERVICE’ : Messages replied by real customer service
- ‘SYSTEM’: Replies automatically triggered by the system, such as welcome messages and timeout replies
- ‘ROBOT’: Messages replied by intelligent robot
Example
{ "type": "TEXT", "content": "{\"content\": \"test\"}", "sender_role": "CUSTOMER_SERVICE"}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
Message ID
Example
{ "code": 0, "data": { "message_id": "7494560109732334261" }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}