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

Api-Key
string
required

Private key to access the API.

Body

application/json
userIds
string[]
required

List of users to send the push notification to

message
object
required

Push notification message details.

customFields
object

A flatmap for custom data that can be used for personalization