RoomsRoom PreferencesMute Notification

Mute Room Notification

Overview

This endpoint allows the current user to mute a specified room. Once muted, new messages in that room will not trigger push notifications. This setting is a personal preference and only affects the current user, not other members.


API Endpoint

Mute Room Notification

Mute a specified room to stop receiving push notifications.

POST /me/mute/:room

Headers

ParameterTypeRequiredDescription
IM-CLIENT-KEYstringClient key
IM-AuthorizationstringClient token

Path Parameters

ParameterTypeRequiredDescription
:roomstringRoom unique identifier

This API does not require a request body.

Example Request

cURL Example:

curl -X "POST" "https://your-app.imkit.io/me/mute/demo-room" \
     -H 'IM-CLIENT-KEY: {IM-CLIENT-KEY}' \
     -H 'IM-Authorization: {IM-Authorization}'

JavaScript Example:

const response = await axios.post(
  `https://your-app.imkit.io/me/mute/${roomID}`,
  null,
  {
    headers: {
      "IM-CLIENT-KEY": `${IM_CLIENT_KEY}`,
      "IM-Authorization": `${TOKEN}`,
    },
  }
);

Response

Success Response (200 OK)

ParameterTypeDescription
RCnumberResponse code (0 indicates success)
RMstringResponse message
resultobjectUpdated current user information
result._idstringUser unique identifier
result.nicknamestringUser display name
result.emailstringUser email
result.mutearray[string]Array of muted room IDs (newly added after muting)

Example Response

{
  "RC": 0,
  "RM": "OK",
  "result": {
    "_id": "1485248560558",
    "email": "test@test.com",
    "nickname": "Test AB",
    "appID": "SampleApp",
    "avatarUrl": "http://example.com/avatarUrl",
    "address": {
      "port": 56216,
      "family": "IPv6",
      "address": "::1"
    },
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36",
    "mute": ["58871b877390be11d5f1ab30"],
    "lastLoginTimeMS": 1487068306745
  }
}

Error Response

When a request fails, you will receive an error response containing error details. Common error scenarios include:

  • Invalid client key or authorization token
  • The specified room does not exist
  • Internal server error

Use Cases

  • Stop notifications for a specific room: When a user does not want to be disturbed by messages from a particular room, they can mute it
  • Unmute: To unmute, use the Unmute Room Notification API

Notes

  • Personal preference: The mute setting only affects the current user; other members’ notifications are not affected
  • Mute status: After success, the room ID is added to the mute array in the response, which represents all rooms currently muted by the user
© 2026 FUNTEK Software Inc. All rights reserved.