Push Notification
Send Push Notification
Push Notification
Send Push Notification
Send push notification to a list of users
POST
/
v1
/
push
curl --request POST \
--url https://api.castled.io/backend/external/v1/push \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"userIds": [
"user-8921892",
"user-1622767"
],
"message": {
"type": "MOBILE_PUSH",
"iosEnabled": true,
"androidEnabled": true,
"title": {
"en": "Hey there!",
"hi": "सुनो!"
},
"subtitle": {},
"body": {
"en": "Hello from Castled!",
"hi": "कैसल्ड की ओर से नमस्ते!"
},
"collapseId": "<string>",
"ttl": 123,
"action": "DEFAULT",
"androidActionUrl": "<string>",
"iosActionUrl": "<string>",
"keyVals": {},
"bigImageUrl": "<string>",
"largeIconUrl": "<string>",
"smallIconResourceId": "<string>",
"androidChannel": "<string>",
"priority": "NORMAL",
"androidActionButtons": [
{
"label": "<string>",
"url": "<string>",
"clickAction": "DEEP_LINKING",
"keyVals": {}
}
],
"soundFileName": "<string>",
"richMediaUrl": "<string>",
"mediaType": "IMAGE",
"interruptionLevel": "PASSIVE",
"badgeCount": 123,
"relevanceScore": "SCORE_MAX",
"contentAvailable": true,
"actionCategory": {
"type": "PREDEFINED_CATEGORY",
"name": "<string>",
"actionComponents": [
{
"actionId": "<string>",
"url": "<string>",
"clickAction": "DEEP_LINKING",
"keyVals": {},
"useWebview": true
}
]
}
},
"customFields": {}
}'
Headers
Private key to access the API.
Body
application/json
Push notification send data.
Schema representing push notification send request data.
Response
204
Push send request enqueued successfully
curl --request POST \
--url https://api.castled.io/backend/external/v1/push \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"userIds": [
"user-8921892",
"user-1622767"
],
"message": {
"type": "MOBILE_PUSH",
"iosEnabled": true,
"androidEnabled": true,
"title": {
"en": "Hey there!",
"hi": "सुनो!"
},
"subtitle": {},
"body": {
"en": "Hello from Castled!",
"hi": "कैसल्ड की ओर से नमस्ते!"
},
"collapseId": "<string>",
"ttl": 123,
"action": "DEFAULT",
"androidActionUrl": "<string>",
"iosActionUrl": "<string>",
"keyVals": {},
"bigImageUrl": "<string>",
"largeIconUrl": "<string>",
"smallIconResourceId": "<string>",
"androidChannel": "<string>",
"priority": "NORMAL",
"androidActionButtons": [
{
"label": "<string>",
"url": "<string>",
"clickAction": "DEEP_LINKING",
"keyVals": {}
}
],
"soundFileName": "<string>",
"richMediaUrl": "<string>",
"mediaType": "IMAGE",
"interruptionLevel": "PASSIVE",
"badgeCount": 123,
"relevanceScore": "SCORE_MAX",
"contentAvailable": true,
"actionCategory": {
"type": "PREDEFINED_CATEGORY",
"name": "<string>",
"actionComponents": [
{
"actionId": "<string>",
"url": "<string>",
"clickAction": "DEEP_LINKING",
"keyVals": {},
"useWebview": true
}
]
}
},
"customFields": {}
}'