Skip to main content

Customizing Community Notification Settings

Overview

The LikeMinds platform allows community-level notification settings to be customized using dedicated APIs. These APIs help administrators manage the delivery preferences for community members—ranging from all message alerts to just mentions and replies. This guide provides a walkthrough for retrieving and updating notification preferences via API.


Prerequisites

Before customizing notification settings, ensure the following:

  • You have Admin or Community Manager (CM) privileges.

  • The community has been created via the LikeMinds Dashboard.

  • You have valid API credentials as described below:

    • API Key: API Key of the community.
    • Platform Code: This defines the platform/os on which application is running. For example: Android: an, iOS: ios, Flutter: fl etc. Check documentation for further more.
    • Version Code: Code version on which the current application is running. Same API can behave differently with different version codes on the same platform.
    • Bearer Token: Create the authentication token using the API /sdk/initiate

Authentication

You must authenticate using an Admin/CM token.

Authentication Steps

curl --location 'https://auth.likeminds.community/sdk/initiate' \
--header 'x-api-key: LM_API_KEY' \
--data '{
"user_name": "ADMIN_NAME",
"user_unique_id": "ADMIN_UUID"
}'

Extract the access_token from the response for use in all authorized API calls.


Notification Settings API

GET /community/settings/notification/conversation

Purpose: Retrieve the current default notification setting for a community.

Headers Required:

HeaderTypeDescription
AuthorizationStringUse the access_token received in authentication step
x-api-keyStringYour platform API key
x-platform-typeStringPlatform type (e.g. dashboard)
x-platform-codeStringUnique code for the platform
x-version-codeIntVersion number of the platform

Response Example:

{
"success": true,
"community_notification_settings": {
"noti_state": 1
}
}

PUT /community/settings/notification/conversation

Purpose: Update the community’s default notification setting.

Headers: Same as the GET request.

Request Body:

KeyTypeRequiredDescription
noti_stateIntYesNotification preference (see options below)

noti_state values:

ValueMeaning
1Receive all messages
2Receive only mentions and replies
3Receive DMs, mentions, and poll notifications

Example Request:

curl --location --request PUT 'https://auth.likeminds.community/community/settings/notification/conversation' \
--header 'Authorization: Bearer ADMIN_ACCESS_TOKEN' \
--header 'x-api-key: LM_API_KEY' \
--header 'x-platform-type: dashboard' \
--header 'x-platform-code: ABC123' \
--header 'x-version-code: 1' \
--header 'Content-Type: application/json' \
--data '{
"noti_state": 2
}'

Success Response:

{
"success": true
}

Failure Response:

{
"success": false,
"error_message": "You are not CM/Owner of this community"
}

Use Case Examples

Use Case 1: Set Notifications to “All Messages”

Scenario: Admin wants all members to receive every message in community discussions.

API Call:


PUT /community/settings/notification/conversation

{
"noti_state": 1
}

Effect: All members will be notified for every message posted in the community.


Use Case 2: Set Notifications to “Mentions and Replies Only”

Scenario: Admin wants to minimize noise and notify users only when they are directly mentioned or replied to.

API Call:

PUT /community/settings/notification/conversation
{
"noti_state": 2
}

Effect: Users will only receive notifications for @mentions or direct replies.


Use Case 3: Enable Notifications for DMs, Mentions, and Polls

Scenario: Community focuses on specific types of engagement—admins want to limit notifications to direct messages, micro-polls, and mentions.

API Call:

PUT /community/settings/notification/conversation
{
"noti_state": 3
}

Effect: Members will receive notifications only for DMs, mentions, and poll activities.


Best Practices

  • Use noti_state = 2 or 3 to reduce notification fatigue.
  • Always test updates on a staging environment before production.
  • Use descriptive analytics events to monitor notification changes.

Verifying the Update

Call the GET API to confirm the updated setting:

GET /community/settings/notification/conversation

Response:

{
"success": true,
"community_notification_settings": {
"noti_state": 3
}
}