Overview
Sends a system message or remote push notification to all users or to users selected by tags.
Request
Authentication: Add authentication headers to the request. See Authentication.
Method
POST
Rate limit
100 requests/second
Endpoint https://API domain/apigateway/push
Content-Type
application/json
Request Example
POST /apigateway/push HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
{
"from_user_id":"userid1",
"condition":{
"tags_and":["tag1","tag2"]
},
"msg_body":{
"msg_type":"jg:text",
"msg_content":"{\"content\":\"Hello World!\"}"
}
}
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| from_user_id | string | Yes | Sender's user ID. Maximum length: 32 characters. | |
| condition | object | Yes | Criteria used to select target users. | |
| tags_and | array | No | Selects users who have all specified tags. Mutually exclusive with tags_or. | |
| tags_or | array | No | Selects users who have at least one specified tag. Mutually exclusive with tags_and. | |
| msg_body | object | No | System message sent to target users. Mutually exclusive with notification. | |
| notification | object | No | Remote push notification sent to target users. Mutually exclusive with msg_body. |
Response Example
{
"code":0,
"msg":"sucess",
"data":{
"push_id":"xxxxx"
}
}