Skip to content

Send Message

POST
/customer_service/202606/conversations/{conversation_id}/messages

Use this API to send a message to the buyer in a conversation.

conversation_id
required
string

Conversation ID

shop_cipher
required
string

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

Media typeapplication/json
object
type
required

Message type. Possible enumerations:

  • TEXT
  • IMAGE
  • VIDEO
  • PRODUCT_CARD
  • ORDER_CARD
  • RETURN_REFUND_CARD
  • COUPON_CARD
  • LOGISTICS_CARD
string
Allowed values: TEXT IMAGE VIDEO PRODUCT_CARD ORDER_CARD RETURN_REFUND_CARD COUPON_CARD LOGISTICS_CARD
content
required

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:
  1. display_type==CHAT or display_type==REGULAR
  2. status==ONGOING
  3. creation_source==SELLER_CENTER
  4. target_buyer_segment!=REPEAT_CUSTOMERS
string
sender_role

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
string
Example
{
"type": "TEXT",
"content": "{\"content\": \"test\"}",
"sender_role": "CUSTOMER_SERVICE"
}

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
message_id

Message ID

string
Example
{
"code": 0,
"data": {
"message_id": "7494560109732334261"
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
}