このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。
Feedback

Common Parameters (Description of WebInfo and Message Fields)

Note:
WebInfo and Message are both optional fields, but at least one must be provided.
If only WebInfo is included, the push notification is delivered exclusively via the browser notification bar.
If only Message is included, push notifications will be delivered to users only when the web page is open.
If both WebInfo and Message are included, online users receive the Message push notification, while offline users receive the WebInfo push notification in the browser notification bar.

Browser Notification Bar Push

{
// From_Account, MsgRandom, Condition and other parameters
"WebInfo": {
"Title": "webpush title",
"Desc": "IM webpush batch",
"Ext": "{\"entity\":{\"action\":1,\"chatType\":0}}", // Pass-through field, push uses JSON format string
"Icon": "http://icon.png",
"Image": "http://image.png",
"URL": "http://url"
}
}

Online Push

Standard style example:
{
// From_Account, MsgRandom, Condition, WebInfo and other parameters
"Message": {
"MsgType": "standard",
"MsgContent": {
"Text": {
"Title": "nick",
"Desc": "hello world"
},
"Image": {
"URL": "http://xxx.png",
"LinkURL": "https://xxx.com"
},
"Close": 1,
"Placement": 8,
"Duration": 0,
"Button": [
{
"Text": "Like1",
"Icon": "http://xxx.png",
"Url": "https://xxx.com"
},
{
"Text": "Like2",
"Icon": "http://xxx.png",
"Url": "https://xxx.com"
}
]
},
"Ext": ""
}
}
HTML style example:
{
// From_Account, MsgRandom, Condition, WebInfo and other parameters
"Message": {
"MsgType": "html",
"MsgContent": {
"Duration": 86400,
"Placement": 8,
"Html": "PGgxPkhlbGxvPC9oMT4=" // For example, <h1>Hello</h1> can be encoded as PGgxPkhlbGxvPC9oMT4=
},
"Ext": ""
}
}
Custom style example:
Data as a string
{
// From_Account, MsgRandom, Condition, WebInfo and other parameters
"Message": {
"MsgType": "custom",
"MsgContent": {
"Data": "this is custom data"
},
"Ext": ""
}
}
Data as a JSON object
{
// From_Account, MsgRandom, Condition, WebInfo and other parameters
"Message": {
"MsgType": "custom",
"MsgContent": {
"Data": {
"1": 1,
"type": "notice",
"payload": {
"id": "10001",
"content": "hello webpush"
}
}
},
"Ext": ""
}
}

Simultaneous Online and Offline Push

{
// From_Account, MsgRandom, Condition and other parameters
"WebInfo": {
"Title": "webpush title",
"Desc": "IM webpush batch",
"Ext": "{\"entity\":{\"action\":1,\"chatType\":0}}",
"Icon": "http://icon.png",
"Image": "http://image.png",
"URL": "http://url"
},
"Message": {
"MsgType": "standard",
"MsgContent": {
"Text": {
"Title": "xxx",
"Desc": "hello world"
},
"Image": {
"URL": "http://i.imgur.com/N8SN8ZS.png",
"LinkURL": "https://www.baidu.com"
},
"Close": 1, // 1 - show close button, 0 - do not show close button
"Placement": 8, // 0 - center, 1 - top left, 2 - top center, 3 - top right, 4 - right center, 5 - bottom right, 6 - bottom center, 7 - bottom left, 8 - left center
"Duration": 86400, // 0 means does not disappear, maximum value does not exceed 86400
"Button": [
{
"Text": "Like", // text
"Icon": "http://Icon.png", // icon
"Url": "https://Url" // redirect link
},
{
"Text": "Like1", // text
"Icon": "http://Icon.png", // icon
"Url": "https://Url" // redirect link
}
]
},
"Ext": ""
}
}

WebInfo Field Description

Field
Type
Attribute
Description
Title
String
Optional
Notification title. Max 100 characters; excess will be truncated.
Desc
String
Required
Notification content. Max 200 characters; excess will be truncated.
URL
String
Required
Redirect URL when the notification is clicked.
Ext
String
Optional
Pass-through data for the notification. This can be retrieved via client webhook when clicked. Uses JSON format string.
Icon
String
Optional
URL for notification icon. Recommended size: 192×192px, file size ≤ 1MB. Supported formats: JPG, PNG, GIF, SVG, ico.
Image
String
Optional
URL for notification image. Recommended aspect ratio: 16:9 (e.g., 320x180px), file size ≤ 1MB. Supported formats: JPG, PNG, GIF, SVG, ico. Supported by Chrome, Opera, and Yandex browsers.

Message Field Description

Field
Type
Attribute
Description
MsgType
String
Required
Notification type. Supported values: standard (standard style), html (HTML style), custom (custom push).
MsgContent
Object
Required
Notification content configuration. Structure varies by MsgType. See details below.
Ext
String
Optional
Pass-through content for the client.

MsgContent Field Description for MsgType standard (Standard Style)

Field
Type
Attribute
Description
Text
Object
Optional
Popup text. See Text field description below. At least one of Text or Image must be provided.
Image
Object
Optional
Popup image. See Image field description below. At least one of Text or Image must be provided.
Close
Integer
Optional
Show close button: 1 = show, 0 = hide.
Placement
Integer
Optional
Popup position: 0 - center, 1 - top left, 2 - top center, 3 - top right, 4 - right center, 5 - bottom right, 6 - bottom center, 7 - bottom left, 8 - left center.
Duration
Integer
Optional
Popup duration in seconds. Default is 0 (does not disappear). Maximum: 86400.
Button
Object Array
Optional
Array of up to 2 buttons. See Button field description below.
Text Field Description
Field
Type
Attribute
Description
Title
String
Optional
Popup title.
Desc
String
Required
Popup description.
Image Field Description
Field
Type
Attribute
Description
URL
String
Required
URL for popup image.
LinkURL
String
Optional
Redirect link when image is clicked.
Button Field Description
Field
Type
Attribute
Description
Text
String
Required
Button text.
Icon
String
Optional
URL for button icon.
Url
String
Optional
Redirect link when button clicked.

MsgContent Field Description for MsgType html (HTML Style)

Field
Type
Attribute
Description
Duration
Integer
Optional
Popup duration in seconds. 0 means persistent. Maximum: 86400.
Placement
Integer
Optional
Popup position: 0 - center, 1 - top left, 2 - top center, 3 - top right, 4 - right center, 5 - bottom right, 6 - bottom center, 7 - bottom left, 8 - left center.
Html
String
Required
HTML content must be base64 encoded to ensure JSON structure integrity.

MsgContent Field Description for MsgType custom (Custom Push)

Field
Type
Attribute
Description
Data
String/Object
Required
Custom data. Can be a string or a JSON object.