> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Mute Management

> Mute and unmute chat channel members with the current SDK APIs.

Use member mute when a user should keep channel access but lose the ability to send messages for a period of time. Mute duration units differ by platform, so pass the value in the unit expected by the SDK you are using.

## Platform Surface

| Operation | TypeScript | iOS | Android | Flutter |
| - | - | - | - | - |
| Mute members | `ChannelRepository.Moderation.muteMembers(channelId, userIds, mutePeriod?)` | `AmityChannelModeration(channelId:).muteMembers(_:mutePeriod:)` | `moderation(channelId).muteMembers(timeout, userIds)` | `moderation(channelId).muteMembers(userIds, millis:)` |
| Unmute members | `ChannelRepository.Moderation.unmuteMembers(channelId, userIds)` | `AmityChannelModeration(channelId:).unmuteMembers(_:)` | `moderation(channelId).unmuteMembers(userIds)` | `moderation(channelId).unmuteMembers(userIds)` |
| Duration unit | Seconds; omit for indefinite mute | Seconds | `org.joda.time.Duration` | Milliseconds; defaults to 600000 |
| Result | `Promise<boolean>` | `Void` | `Completable` | `Future` |

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `channelId` | Yes | Channel ID where the mute or unmute should be applied. |
| `userIds` | Yes | One or more user IDs to mute or unmute. Empty lists are rejected. |
| `mutePeriod` / `timeout` / `millis` | Mute only | Duration of the mute. TypeScript and iOS take seconds, Android takes a `Duration`, and Flutter takes milliseconds. |
| Moderation permission | Yes | The current user must have permission to moderate the target channel. |

## Mute Members

Mute members when you want a temporary or indefinite send-message restriction without removing channel access. TypeScript's omitted `mutePeriod` means an indefinite mute until unmuted.

```typescript TypeScript theme={null}
import { ChannelRepository } from '@amityco/ts-sdk';

const tenMinutesInSeconds = 10 * 60;

const didMute = await ChannelRepository.Moderation.muteMembers(
  channelId,
  [userId],
  tenMinutesInSeconds,
);

if (didMute) {
  showSuccessMessage(channelId);
}
```

```swift iOS theme={null}
let moderation = AmityChannelModeration(channelId: channelId)
let tenMinutesInSeconds = 10 * 60

try await moderation.muteMembers([userId], mutePeriod: tenMinutesInSeconds)

showSuccessMessage(channelId)
```

```kotlin Android theme={null}
val tenMinutes = org.joda.time.Duration.standardMinutes(10)

val disposable = channelRepository
    .moderation(channelId = channelId)
    .muteMembers(timeout = tenMinutes, userIds = listOf(targetUserId))
    .subscribe(
        { showSuccessMessage(channelId) },
        { error -> handleGeneralError(error) },
    )
```

```dart Flutter theme={null}
const tenMinutesInMillis = 10 * 60 * 1000;

await AmityChatClient.newChannelRepository()
    .moderation(channelId)
    .muteMembers([targetUserId], millis: tenMinutesInMillis);
```

## Unmute Members

Unmute restores the users' ability to send messages in the channel.

```typescript TypeScript theme={null}
import { ChannelRepository } from '@amityco/ts-sdk';

const didUnmute = await ChannelRepository.Moderation.unmuteMembers(channelId, [
  userId,
]);

if (didUnmute) {
  showSuccessMessage(channelId);
}
```

```swift iOS theme={null}
let moderation = AmityChannelModeration(channelId: channelId)

try await moderation.unmuteMembers([userId])

showSuccessMessage(channelId)
```

```kotlin Android theme={null}
val disposable = channelRepository
    .moderation(channelId = channelId)
    .unmuteMembers(userIds = listOf(targetUserId))
    .subscribe(
        { showSuccessMessage(channelId) },
        { error -> handleGeneralError(error) },
    )
```

```dart Flutter theme={null}
await AmityChatClient.newChannelRepository()
    .moderation(channelId)
    .unmuteMembers([targetUserId]);
```

## Duration Notes

> [card] TypeScript
>
> Pass seconds. Omit `mutePeriod` to mute indefinitely until a later `unmuteMembers` call.

> [card] iOS
>
> Pass seconds through `mutePeriod`. The SDK converts the value before sending the request.

> [card] Android
>
> Pass an `org.joda.time.Duration`, such as `Duration.standardMinutes(10)`.

> [card] Flutter
>
> Pass milliseconds through `millis`. If omitted, the current public SDK default is 600000 milliseconds.

## Related Topics

> [card] [Ban Management](/social-plus-sdk/chat/conversation-management/channels/governance/ban-management.md)
>
> Remove channel access until a user is unbanned.

> [card] [Query Members](/social-plus-sdk/chat/conversation-management/members/query-members.md)
>
> Filter members by muted or banned membership states.

> [card] [Message Creation](/social-plus-sdk/chat/messaging-features/message-creation/send-a-message.md)
>
> Send messages after membership and moderation checks pass.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.