Notifications

Prev Next

Manage workspace notifications using the available Notifications APIs. These endpoints help you deliver important updates and control how users receive alerts.

Banners API

Use the Banners API to view and dismiss workspace banners. Banners may include important information such as product updates, announcements, or deprecation notices.

Show and clear workspace banners

  1. Get the banners for the authenticated user.

  2. Dismiss a banner once the user has seen it.

Push Tokens API

The Push Tokens API enables you to create and manage push notifications for your workspace.

  • Register and manage push tokens to support notification delivery.

  • For setup and configuration guidance, refer to the Push Notifications documentation.

The push token object

Registering a device returns a push token record. A trimmed example from Create Push Token:

{
  "result": {
    "_id": "DMMjKG2hFoLvM2hk7",
    "token": { "gcm": "TOKEN" },
    "appName": "RocketAPP",
    "userId": "52d5Rw8LT3TeDa59Z",
    "enabled": true,
    "createdAt": "2018-09-11T18:22:55.006Z"
  },
  "success": true
}

Fields you use most often:

  • token: The provider token, keyed by type — gcm for Android or apn for iOS.

  • appName: The application the token belongs to.

  • userId: The user who receives the notifications.

Register a device for push notifications

  1. Create the push token with the device's provider token when the user signs in.

  2. Send a test notification to confirm delivery, and use Get Push Info to check the workspace's push gateway configuration.

  3. Delete the push token when the user signs out of the device.

Conventions

  • Push delivery depends on the workspace's push settings — the Rocket.Chat gateway or a custom gateway. See the Push Notifications admin guide.

  • A push token is per device and per app: register on sign-in, delete on sign-out.

  • Banner endpoints act on the authenticated user's banners only.