/
Notification Banner API guidelines

Notification Banner API guidelines

The Notification Banner feature allows system admins to send notification to users of the chat app.

Requirements:

  • Should be prominently displayed at the top of the page.

  • Should include a clear and concise message about the outage.

  • Should have a link to a status page or more details.

  • Should be easily dismissible by the user once they have acknowledged it.

Authentication:
All endpoints require authentication and most endpoints require the CHAT_ADMIN_ALL (chat.admin.all) role.

Base URL

{base_url}/theme/graphql - same url for all operations

The base_url is the node-theme endpoint. All operations are performed with POST method.

Operations

1. Create Notification Banner

Creates a new notification banner.

Required Role: CHAT_ADMIN_ALL

Request Body:

{ "query": "mutation CreateNotificationBanner($input: NotificationBannerCreateInput!) { createNotificationBanner(input: $input) { id title message link linkText startDate endDate isActive type isDismissible notificationTo } }", "variables": { "input": { "title": "Test Notification 1", "message": "This is a sample notification to all users", "type": "ANNOUNCEMENT", "isDismissible": true, "startDate": "2025-01-25T11:59:36.809Z", "endDate": "2025-01-30T11:59:36.809Z", "notificationTo": [] } } }

Note:

  • The startDate and endDate, signifies when you want the notification banner to be displayed to the user.

  • notificationTo signifies which company you want to be targeted with the notification. If “notificationTo” array is empty [], notification banner will be sent to all companies.
    You can target specific companies by adding their companyId as an array of string in notificationTo.
    Eg: notificationTo: [“companyA”, “companyB”, “companyC”]

  • only one notification banner can be active at the moment


ENUM for type:

export enum NotificationBannerType { MAINTENANCE = "MAINTENANCE", ANNOUNCEMENT = "ANNOUNCEMENT", INFO = "INFO", OUTAGE = "OUTAGE" }

 

Sample Response:

 

2. Update Notification Banner

Updates an existing notification banner.

Required Role: CHAT_ADMIN_ALL

Request Body:

Sample Response:

3. Delete Notification Banner

Deletes a notification banner.

Required Role: CHAT_ADMIN_ALL

Request Body:

Sample Response:

4. Get all Notification Banner

Gets all notification banner.

Required Role: CHAT_ADMIN_ALL

Request Body:

Sample Response:

Author

@Adebayo Mustafa

© 2024 Unique AG. All rights reserved. Privacy PolicyTerms of Service