v1

latestOpenAPI 3.0.12026-07-24210349345.4 KB

Send Push

This endpoint can only be used with your Server credentials and allows you to send notifications directly to one or more customers.

post/v2/notifications

Request body

collapseIdstring
runBackgroundHandlerboolean

Sets content-available for iOS

userMetastring json

Object keyed by customerID of meta-data for each recipient

ttlinteger

Number of seconds the message should be held at the messaging gateways for delivery attempts if the device is not currently online. Maximum of 2419200s (28 days), defaults to 3 days if not set.

Response

202

Example response

{
  "errors": {
    "unknownUserIds": [
      "cust_001"
    ]
  },
  "notification": {
    "id": 1,
    "title": "Title",
    "message": "Message",
    "isBackgroundData": true,
    "iosConfig": {
      "hasBadge": true,
      "badgeType": "setTo",
      "badgeCount": 1
    },
    "androidConfig": {
      "notificationType": "general"
    },
    "messageId": 5,
    "appId": 1,
    "source": 2,
    "filters": {
      "userIds": [
        "cust_002"
      ]
    },
    "data": {
      "key": "value"
    },
    "ttl": 1440
  }
}