push-notifications

Send push notification to specific device tokens

Sends a push notification directly to specified Firebase device tokens

post/notifications/push/send/tokens

Request body

deviceTokensstring[] required

Array of device tokens to send notification to

Example request

{
  "deviceTokens": [
    "fcm_token_1",
    "fcm_token_2"
  ],
  "payload": {
    "title": "New Message",
    "body": "You have a new message from John",
    "data": {
      "messageId": "123",
      "senderId": "user456"
    },
    "imageUrl": "https://example.com/image.jpg",
    "clickAction": "OPEN_MESSAGE"
  }
}

Response

Notification sent successfully

successCountnumber required

Number of successful notifications sent

failureCountnumber required

Number of failed notifications

resultsstring[] required

Detailed results for each notification attempt

Example response

{
  "successCount": 5,
  "failureCount": 1,
  "results": [
    {
      "success": true
    },
    {
      "success": false,
      "error": "Invalid token"
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.