device-tokens

Send notification to user

Send push notification to all devices of a specific user

post/device-tokens/notifications/send-to-user

Request

  • Base URL
    https://api.tonewow.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.tonewow.com/device-tokens/notifications/send-to-user
  • Auth
    none declared

Request body

userIdstring required

User ID to send notification to

Example request

{
  "userId": "user123",
  "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 operation across all 6 revisions of this API.