Appearance
Send IM Message ​
Send an instant message to a buyer.
Basic Information ​
| Property | Value |
|---|---|
| Method | POST |
| Path | /seller/im/send-msg |
| Authentication | Bearer Token |
| Content-Type | application/json |
Request Headers ​
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer <accessToken> |
Request Body Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
buyerId | integer | Yes | Buyer ID |
msgRandom | integer | Yes | Message random number (32-bit unsigned integer). Used for deduplication of messages within the same second |
msgBody | object | Yes | Message body |
msgBody.msgType | string | Yes | Message type (see below) |
msgBody.msgContent | object | Yes | Message content object |
Supported msgType values:
| Value | Description |
|---|---|
TIMTextElem | Text message |
TIMImageElem | Image message |
TIMFileElem | File message |
TIMSoundElem | Voice message |
TIMVideoFileElem | Video message |
TIMLocationElem | Location message |
TIMFaceElem | Emoticon message |
TIMCustomElem | Custom message |
Request Example ​
http
POST /merchant-api/seller/im/send-msg HTTP/1.1
Host: paas-gateway.imetastore.io
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"buyerId": 1907369850568257537,
"msgRandom": 123456789,
"msgBody": {
"msgType": "TIMTextElem",
"msgContent": {
"text": "Hello! Your order has been delivered."
}
}
}Field Name Convention
In actual requests, the first letter of msgBody field names should be lowercase. For example: {"msgType":"TIMTextElem","msgContent":{"text":"Hello!"}}
Success Response ​
json
{
"code": "0000",
"msg": "Success",
"time": "2025-12-17T13:44:16.000Z"
}