Skip to main content

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

ParameterData TypeRequiredDescription
from_user_idstringYesSender's user ID. Maximum length: 32 characters.
conditionobjectYesCriteria used to select target users.
tags_andarrayNoSelects users who have all specified tags. Mutually exclusive with tags_or.
tags_orarrayNoSelects users who have at least one specified tag. Mutually exclusive with tags_and.
msg_bodyobjectNoSystem message sent to target users. Mutually exclusive with notification.
notificationobjectNoRemote push notification sent to target users. Mutually exclusive with msg_body.

Response Example

{
"code":0,
"msg":"sucess",
"data":{
"push_id":"xxxxx"
}
}