Skip to navigation

Send topic-based push notification

Send push notifications to all devices subscribed to a topic.

Features:

  • Topic-based messaging for scalable notifications
  • No need to manage individual device tokens
  • Automatic delivery to all subscribed devices
  • Same rich notification features as direct messaging

Use Cases:

  • News updates by category
  • Sports scores by team
  • Product announcements by interest
  • Regional notifications

Topic Management:

  • Topics are created automatically when first used
  • Devices can subscribe/unsubscribe to topics
  • Topics support hierarchical naming (e.g., “sports.football.team1”)

Authentication

AuthorizationBearer

JWT token for authentication. Use ‘test-jwt-token’ for development.

Request

This endpoint expects an object.
topicstringRequired>=1 character
titlestringRequired>=1 character
bodystringRequired>=1 character
dataobjectOptional
imageUrlstringOptionalformat: "uri"
clickActionstringOptional
badgedoubleOptional>=0
soundstringOptional
priority"high" or "normal"Optional
timeToLivedoubleOptional0-2419200
collapseKeystringOptional

Response

This endpoint returns an object.
successboolean
dataobjectOptional
errorobjectOptional