> For the complete documentation index, see [llms.txt](https://tools.docs.sendbird.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tools.docs.sendbird.com/readme/commands/command-reference.md).

# Chat commands

Use these commands to:

* **Users:** Create, find, and update Chat users, and issue their access tokens.
* **Channels:** Create and find channels, invite members, and join or leave as a Chat user.
* **Messages:** Send text and files, read messages, reply in threads, add reactions, run polls, and report content.
* **Delivery:** Watch channel events and check read and delivery receipts.
* **Settings:** Manage Chat settings, webhooks, push notifications, and user notification settings.
* **Moderation and announcements:** Block keywords, mute or ban users, and send announcements.
* **Analytics and usage:** Read Chat metrics and usage.

Each table lists a command's own options. For options shared by all commands and for reading results, see [CLI reference](/readme/commands.md). For login, organization, app, and app feature commands, see [Account commands](/readme/commands/account-and-cli-commands.md). For step-by-step message tests, follow the [Chat tutorials](/readme/chat.md).

This page includes full input examples for:

* [Issuing a test user's access token](#issue-a-test-users-access-token)
* [Setting a weekly Do Not Disturb schedule](#set-a-weekly-do-not-disturb-schedule)
* [Updating a Chat webhook](#update-a-chat-webhook)

Before you run an example that changes settings, [log in and select your test app](/readme/quickstart.md#step-2-log-in), and check the app with `sendbird --profile prod app get`.

## Your account and Chat users

Commands that manage resources run as your logged-in Sendbird account and follow its Sendbird Dashboard role. Commands with `--as-user` run as a Chat user and follow that user's channel membership and operator permissions. An operator is a Chat user who can moderate a channel, such as muting or banning users or freezing the channel.

Chat commands with `--as-user`, such as `chat message send` and the commands that start with `chat sdk`, connect to Sendbird Chat as that user through the Chat SDK, the library that apps use to connect to Chat. The CLI runs the action and then disconnects. Use these commands to test what a user sees, such as sending messages, typing, or read receipts. They don't add the Chat SDK to your app. To add Chat to your app, see [Add Chat](/plugins/client/add-chat.md).

## Change Chat settings safely

Change a setting in this order:

1. Read the current setting.
2. Preview the change with `--dry-run`.
3. Apply the change.
4. Read the setting again.

Enabling a feature can affect usage charges under your plan.

## Chat users

| Command                              | Purpose                                                                          | Command-specific inputs                                                                                                               |
| ------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat user list`            | List or search Chat users, with cursor pagination.                               | `--limit <value>` `--token <value>` `--user-ids <value>` `--nickname <value>` `--nickname-startswith <value>` `--active-mode <value>` |
| `sendbird chat user search`          | List or search Chat users, with cursor pagination.                               | `--limit <value>` `--token <value>` `--user-ids <value>` `--nickname <value>` `--nickname-startswith <value>` `--active-mode <value>` |
| `sendbird chat user get`             | Get a Chat user.                                                                 | `--id <value>`                                                                                                                        |
| `sendbird chat user create`          | Create a Chat user.                                                              | `--user-id <value>` `--nickname <value>` `--profile-url <value>` `--issue-access-token <value>`                                       |
| `sendbird chat user update`          | Update nickname or profile URL.                                                  | `--id <value>` `--nickname <value>` `--profile-url <value>`                                                                           |
| `sendbird chat user delete`          | Delete a Chat user.                                                              | `--id <value>`                                                                                                                        |
| `sendbird chat user activate`        | Activate a Chat user.                                                            | `--id <value>`                                                                                                                        |
| `sendbird chat user deactivate`      | Deactivate a Chat user.                                                          | `--id <value>` `--leave-all-when-deactivated <value>`                                                                                 |
| `sendbird chat user token get`       | Read a user's access token and save it to a private file with `--secret-output`. | `--id <value>` `--with-access-token <value>`                                                                                          |
| `sendbird chat user token issue`     | Issue or replace a user access token.                                            | `--id <value>`                                                                                                                        |
| `sendbird chat user metadata get`    | Get user metadata.                                                               | `--id <value>`                                                                                                                        |
| `sendbird chat user metadata set`    | Set user metadata.                                                               | `--id <value>` `--metadata <value>`                                                                                                   |
| `sendbird chat user metadata delete` | Delete all metadata of one user.                                                 | `--id <value>`                                                                                                                        |

### Issue a test user's access token

Use `chat user token issue` to issue or replace a test user's access token. The CLI doesn't issue a missing token when an SDK command connects. In production, your server issues user tokens instead; see [Connect users with server-issued tokens](/plugins/client/add-chat.md#connect-users-with-server-issued-tokens).

| Input           | Requirement                                                                                                                          |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Selected app    | A saved app selection, or an explicit `--app-id`.                                                                                    |
| --id            | Required nonempty Chat user ID.                                                                                                      |
| --yes           | Required to execute the issuance or replacement.                                                                                     |
| --secret-output | Use a new private output file when you need sensitive output. An existing file isn't overwritten; a path inside Git must be ignored. |

Replace `<USER_ID>` with your test user's ID, without the angle brackets. Preview the request, then issue the token:

```bash
sendbird --profile prod --json chat user token issue --id <USER_ID> --dry-run
sendbird --profile prod --json chat user token issue --id <USER_ID> --yes
```

`result.user_id` shows which user received the token. To check that the user can connect, run `sendbird --profile prod --json chat sdk status --as-user <USER_ID>`. The command succeeds when `result.connected` is `true`. Keep token values out of terminal logs, agent requests, and app source code.

## Chat channels

| Command                                    | Purpose                                                                                                                                                        | Command-specific inputs                                                                                                                                                                     |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat channel list`               | List or search Open or Group channels.                                                                                                                         | `--type <value>` `--limit <value>` `--token <value>` `--name-contains <value>` `--url-contains <value>` `--channel-urls <value>` `--custom-types <value>` `--show-empty <value>`            |
| `sendbird chat channel search`             | List or search Open or Group channels.                                                                                                                         | `--type <value>` `--limit <value>` `--token <value>` `--name-contains <value>` `--url-contains <value>` `--channel-urls <value>` `--custom-types <value>` `--show-empty <value>`            |
| `sendbird chat channel get`                | Get a channel.                                                                                                                                                 | `--id <value>` `--type <value>`                                                                                                                                                             |
| `sendbird chat channel create`             | Create an Open or Group channel.                                                                                                                               | `--type <value>` `--name <value>` `--channel-url <value>` `--cover-url <value>` `--custom-type <value>` `--user-ids <value>` `--is-distinct <value>` `--is-public <value>` `--data <value>` |
| `sendbird chat channel update`             | Update channel properties.                                                                                                                                     | `--id <value>` `--type <value>` `--name <value>` `--custom-type <value>` `--data <value>`                                                                                                   |
| `sendbird chat channel delete`             | Delete a channel.                                                                                                                                              | `--id <value>` `--type <value>`                                                                                                                                                             |
| `sendbird chat channel metadata get`       | Read channel metadata.                                                                                                                                         | `--id <value>` `--type <value>`                                                                                                                                                             |
| `sendbird chat channel metadata set`       | Upsert channel metadata.                                                                                                                                       | `--id <value>` `--type <value>` `--metadata <value>`                                                                                                                                        |
| `sendbird chat channel metadata delete`    | Delete one channel metadata key.                                                                                                                               | `--id <value>` `--type <value>` `--key <value>`                                                                                                                                             |
| `sendbird chat channel members list`       | List Group members.                                                                                                                                            | `--id <value>` `--type <value>` `--limit <value>` `--token <value>`                                                                                                                         |
| `sendbird chat channel members invite`     | Invite users to a Group channel.                                                                                                                               | `--id <value>` `--type <value>` `--user-ids <value>`                                                                                                                                        |
| `sendbird chat channel join`               | Join a public Group channel as the connected user.                                                                                                             | `--type <value>` `--id <value>`                                                                                                                                                             |
| `sendbird chat channel leave`              | Leave a Group channel as the connected user.                                                                                                                   | `--type <value>` `--id <value>`                                                                                                                                                             |
| `sendbird chat channel invitation accept`  | Accept the connected user's channel invitation.                                                                                                                | `--type <value>` `--id <value>`                                                                                                                                                             |
| `sendbird chat channel invitation decline` | Decline the connected user's channel invitation.                                                                                                               | `--type <value>` `--id <value>`                                                                                                                                                             |
| `sendbird chat channel participants list`  | List one page of the users currently in an Open channel.                                                                                                       | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                                                                                          |
| `sendbird chat channel read`               | Mark channel messages as read for the connected user.                                                                                                          | `--type <value>` `--id <value>`                                                                                                                                                             |
| `sendbird chat channel typing`             | Show a typing indicator for a set time, then stop it. Group channels only.                                                                                     | `--type <value>` `--id <value>` `--seconds <value>`                                                                                                                                         |
| `sendbird chat channel watch`              | Stream channel events, one line per event, or one JSON line per event with `--json`, until the set time ends, the event limit is reached, or you press Ctrl+C. | `--type <value>` `--id <value>` `--seconds <value>` `--max-events <value>`                                                                                                                  |

## Chat messages and search

| Command                                    | Purpose                                                                                                 | Command-specific inputs                                                                                                                                                                                                                                                                              |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat message send`               | Send a text message as the connected user.                                                              | `--type <value>` `--id <value>` `--mention-type <value>` `--mentioned-user-ids <value>` `--meta-arrays <value>` `--translation-target-languages <value>` `--poll-id <value>` `--message <value>` `--custom-type <value>` `--data <value>` `--parent-message-id <value>`                              |
| `sendbird chat message file`               | Send a file URL or upload a local file as a file message.                                               | `--type <value>` `--id <value>` `--mention-type <value>` `--mentioned-user-ids <value>` `--meta-arrays <value>` `--thumbnail-sizes <value>` `--file <value>` `--file-url <value>` `--file-name <value>` `--mime-type <value>` `--custom-type <value>` `--data <value>` `--parent-message-id <value>` |
| `sendbird chat message list`               | Read one page of channel messages. `--before` is an exclusive timestamp in milliseconds.                | `--type <value>` `--id <value>` `--before-id <value>` `--before <value>` `--limit <value>`                                                                                                                                                                                                           |
| `sendbird chat message get`                | Get one channel message.                                                                                | `--type <value>` `--id <value>` `--message-id <value>`                                                                                                                                                                                                                                               |
| `sendbird chat message update`             | Update your text message, if the channel allows it.                                                     | `--type <value>` `--id <value>` `--message-id <value>` `--mention-type <value>` `--mentioned-user-ids <value>` `--meta-arrays <value>` `--translation-target-languages <value>` `--message <value>` `--data <value>` `--custom-type <value>`                                                         |
| `sendbird chat message delete`             | Delete a message, if the channel allows it.                                                             | `--type <value>` `--id <value>` `--message-id <value>`                                                                                                                                                                                                                                               |
| `sendbird chat message reply`              | Reply to a message in a Group thread.                                                                   | `--type <value>` `--id <value>` `--message-id <value>` `--mention-type <value>` `--mentioned-user-ids <value>` `--meta-arrays <value>` `--translation-target-languages <value>` `--message <value>` `--data <value>` `--custom-type <value>`                                                         |
| `sendbird chat message thread`             | Read replies to a parent message.                                                                       | `--type <value>` `--id <value>` `--message-id <value>` `--before <value>` `--limit <value>` `--inclusive <value>`                                                                                                                                                                                    |
| `sendbird chat message reaction add`       | Add your reaction on a Group message.                                                                   | `--type <value>` `--id <value>` `--message-id <value>` `--key <value>`                                                                                                                                                                                                                               |
| `sendbird chat message reaction remove`    | Remove your reaction on a Group message.                                                                | `--type <value>` `--id <value>` `--message-id <value>` `--key <value>`                                                                                                                                                                                                                               |
| `sendbird chat message receipts`           | Read a message's read and delivery receipts. Group channels only.                                       | `--type <value>` `--id <value>` `--message-id <value>`                                                                                                                                                                                                                                               |
| `sendbird chat message pin`                | Pin a message, if the channel allows it.                                                                | `--type <value>` `--id <value>` `--message-id <value>`                                                                                                                                                                                                                                               |
| `sendbird chat message unpin`              | Unpin a message, if the channel allows it.                                                              | `--type <value>` `--id <value>` `--message-id <value>`                                                                                                                                                                                                                                               |
| `sendbird chat message search`             | Search indexed messages visible to the connected user. New messages can take time to appear in results. | `--limit <value>` `--page <value>` `--keyword <value>` `--channel-url <value>` `--channel-custom-type <value>` `--from <value>` `--to <value>` `--order <value>` `--reverse <value>` `--exact-match <value>` `--advanced-query <value>`                                                              |
| `sendbird chat message meta keys create`   | Create message meta-array keys; not channel metadata.                                                   | `--type <value>` `--id <value>` `--message-id <value>` `--keys <value>`                                                                                                                                                                                                                              |
| `sendbird chat message meta keys delete`   | Delete message meta-array keys; not channel metadata.                                                   | `--type <value>` `--id <value>` `--message-id <value>` `--keys <value>`                                                                                                                                                                                                                              |
| `sendbird chat message meta values add`    | Add message meta-array values; not channel metadata.                                                    | `--type <value>` `--id <value>` `--message-id <value>` `--meta-arrays <value>`                                                                                                                                                                                                                       |
| `sendbird chat message meta values remove` | Remove message meta-array values; not channel metadata.                                                 | `--type <value>` `--id <value>` `--message-id <value>` `--meta-arrays <value>`                                                                                                                                                                                                                       |

## SDK status

| Command                    | Purpose                                            | Command-specific inputs      |
| -------------------------- | -------------------------------------------------- | ---------------------------- |
| `sendbird chat sdk status` | Connect as a Chat user and report the SDK session. | No command-specific options. |

## SDK channel operations

| Command                                          | Purpose                                                                  | Command-specific inputs                                                                                                         |
| ------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat sdk channel members list`         | List one page of members of a Group channel as the connected user.       | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                              |
| `sendbird chat sdk channel members invite`       | Invite users as the connected Group member.                              | `--type <value>` `--id <value>` `--user-ids <value>`                                                                            |
| `sendbird chat sdk channel my list`              | List one page of the connected user's Group channels.                    | `--type <value>` `--member-state <value>` `--limit <value>` `--page <value>`                                                    |
| `sendbird chat sdk channel my unread`            | Get the connected user's total unread message count by Group type.       | `--type <value>`                                                                                                                |
| `sendbird chat sdk channel count-preference get` | Read the connected user's unread count preference for one Group channel. | `--type <value>` `--id <value>`                                                                                                 |
| `sendbird chat sdk channel count-preference set` | Set the connected user's unread count preference for one Group channel.  | `--type <value>` `--id <value>` `--preference <value>`                                                                          |
| `sendbird chat sdk channel typing-users`         | List users currently typing in a Group channel.                          | `--type <value>` `--id <value>`                                                                                                 |
| `sendbird chat sdk channel counters get`         | Read selected channel metacounters as the connected user.                | `--type <value>` `--id <value>` `--keys <value>`                                                                                |
| `sendbird chat sdk channel counters create`      | Create channel metacounters as the connected user.                       | `--type <value>` `--id <value>` `--counters <value>`                                                                            |
| `sendbird chat sdk channel counters increase`    | Atomically increase channel metacounters as the connected user.          | `--type <value>` `--id <value>` `--counters <value>`                                                                            |
| `sendbird chat sdk channel counters decrease`    | Atomically decrease channel metacounters as the connected user.          | `--type <value>` `--id <value>` `--counters <value>`                                                                            |
| `sendbird chat sdk channel push get`             | Read the connected user's channel push preference.                       | `--type <value>` `--id <value>`                                                                                                 |
| `sendbird chat sdk channel push set`             | Set the connected user's channel push preference.                        | `--type <value>` `--id <value>` `--option <value>`                                                                              |
| `sendbird chat sdk channel hide`                 | Hide the channel for the connected user.                                 | `--type <value>` `--id <value>` `--hide-previous-messages <value>`                                                              |
| `sendbird chat sdk channel unhide`               | Unhide the channel for the connected user.                               | `--type <value>` `--id <value>`                                                                                                 |
| `sendbird chat sdk channel reset-history`        | Reset the channel's chat history for the connected user.                 | `--type <value>` `--id <value>`                                                                                                 |
| `sendbird chat sdk channel operators add`        | Add channel operators.                                                   | `--type <value>` `--id <value>` `--user-ids <value>`                                                                            |
| `sendbird chat sdk channel operators remove`     | Remove channel operators.                                                | `--type <value>` `--id <value>` `--user-ids <value>`                                                                            |
| `sendbird chat sdk channel operators list`       | List one page of a channel's operators.                                  | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                              |
| `sendbird chat sdk channel moderation mute`      | Mute a user in a channel, as a channel operator.                         | `--type <value>` `--id <value>` `--user-id <value>` `--seconds <value>` `--description <value>`                                 |
| `sendbird chat sdk channel moderation unmute`    | Unmute a user in a channel, as a channel operator.                       | `--type <value>` `--id <value>` `--user-id <value>`                                                                             |
| `sendbird chat sdk channel moderation ban`       | Ban a user from a channel, as a channel operator.                        | `--type <value>` `--id <value>` `--user-id <value>` `--seconds <value>` `--description <value>`                                 |
| `sendbird chat sdk channel moderation unban`     | Unban a user from a channel, as a channel operator.                      | `--type <value>` `--id <value>` `--user-id <value>`                                                                             |
| `sendbird chat sdk channel moderation freeze`    | Freeze a channel, as a channel operator.                                 | `--type <value>` `--id <value>` `--frozen <value>`                                                                              |
| `sendbird chat sdk channel moderation unfreeze`  | Unfreeze a channel, as a channel operator.                               | `--type <value>` `--id <value>` `--frozen <value>`                                                                              |
| `sendbird chat sdk channel banned list`          | List one page of users banned from a channel.                            | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                              |
| `sendbird chat sdk channel muted list`           | List one page of users muted in a channel.                               | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                              |
| `sendbird chat sdk channel search`               | Search public Group channels visible to the connected user.              | `--limit <value>` `--page <value>` `--name-contains <value>` `--channel-urls <value>` `--custom-types <value>` `--type <value>` |

## SDK messages

| Command                                        | Purpose                                                                                                                       | Command-specific inputs                                                                                               |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat sdk message pins list`          | List one page of pinned messages in a Group channel.                                                                          | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                    |
| `sendbird chat sdk message scheduled create`   | Schedule a text message in a Group channel. `--scheduled-at` takes Unix time in milliseconds, at least five minutes from now. | `--type <value>` `--id <value>` `--message <value>` `--scheduled-at <value>` `--custom-type <value>` `--data <value>` |
| `sendbird chat sdk message scheduled list`     | List scheduled messages by status. `all` includes canceled messages, and `pending` shows messages not yet sent.               | `--type <value>` `--id <value>` `--limit <value>` `--page <value>` `--status <value>`                                 |
| `sendbird chat sdk message scheduled cancel`   | Cancel one scheduled message.                                                                                                 | `--type <value>` `--id <value>` `--message-id <value>`                                                                |
| `sendbird chat sdk message scheduled send-now` | Send one scheduled message now.                                                                                               | `--type <value>` `--id <value>` `--message-id <value>`                                                                |
| `sendbird chat sdk message translate`          | Translate a user message into requested language codes.                                                                       | `--type <value>` `--id <value>` `--message-id <value>` `--languages <value>`                                          |
| `sendbird chat sdk message changes`            | Read SDK message change logs since a timestamp.                                                                               | `--type <value>` `--id <value>` `--since <value>`                                                                     |

## SDK emoji

| Command                        | Purpose                                           | Command-specific inputs      |
| ------------------------------ | ------------------------------------------------- | ---------------------------- |
| `sendbird chat sdk emoji list` | List registered emoji keys for message reactions. | No command-specific options. |

## SDK user settings

| Command                                    | Purpose                                                                                            | Command-specific inputs                                                                                                                  |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat sdk user invitation get`    | Read the connected user's automatic Group invitation acceptance.                                   | No command-specific options.                                                                                                             |
| `sendbird chat sdk user invitation set`    | Set the connected user's automatic Group invitation acceptance.                                    | `--auto-accept <value>`                                                                                                                  |
| `sendbird chat sdk user push get`          | Read the connected user's app-wide push preference.                                                | No command-specific options.                                                                                                             |
| `sendbird chat sdk user push set`          | Set the connected user's app-wide push preference.                                                 | `--option <value>`                                                                                                                       |
| `sendbird chat sdk user snooze get`        | Read the connected user's push snooze period.                                                      | No command-specific options.                                                                                                             |
| `sendbird chat sdk user snooze set`        | Set a snooze window in Unix milliseconds, or disable it while preserving its existing timestamps.  | `--enabled <value>` `--start-at <value>` `--end-at <value>`                                                                              |
| `sendbird chat sdk user search`            | Search SDK-visible users by nickname prefix, IDs, or metadata.                                     | `--limit <value>` `--page <value>` `--nickname-prefix <value>` `--user-ids <value>` `--metadata-key <value>` `--metadata-values <value>` |
| `sendbird chat sdk user block`             | Block a user for the connected Chat user; this is not a channel ban.                               | `--user-id <value>`                                                                                                                      |
| `sendbird chat sdk user unblock`           | Unblock a user for the connected Chat user; this is not a channel ban.                             | `--user-id <value>`                                                                                                                      |
| `sendbird chat sdk user blocked list`      | List the connected user's blocked users.                                                           | `--limit <value>` `--page <value>`                                                                                                       |
| `sendbird chat sdk user languages get`     | Get the connected user's preferred languages for translated push notifications.                    | No command-specific options.                                                                                                             |
| `sendbird chat sdk user languages set`     | Set the connected user's preferred languages for translated push notifications.                    | `--languages <value>`                                                                                                                    |
| `sendbird chat sdk user dnd get`           | Get the connected user's weekly Do Not Disturb schedule; empty schedules disable DND.              | No command-specific options.                                                                                                             |
| `sendbird chat sdk user dnd set`           | Set the connected user's weekly Do Not Disturb schedule; empty schedules disable DND.              | `--schedules <value>` `--timezone <value>`                                                                                               |
| `sendbird chat sdk user device register`   | Register one authorized device push token for the connected user. Other devices stay registered.   | `--provider <value>`                                                                                                                     |
| `sendbird chat sdk user device unregister` | Unregister one authorized device push token for the connected user. Other devices stay registered. | `--provider <value>`                                                                                                                     |
| `sendbird chat sdk user push-template get` | Get the connected user's push template choice.                                                     | No command-specific options.                                                                                                             |
| `sendbird chat sdk user push-template set` | Set the connected user's push template choice.                                                     | `--template <value>`                                                                                                                     |

### Set a weekly Do Not Disturb schedule

Use `chat sdk user dnd set` to change the connected Chat user's weekly Do Not Disturb schedule. First [create a test user](/readme/chat/create-test-users.md), then replace `<USER_ID>` below with that user's ID, without the angle brackets. Read and keep the existing schedule before changing it:

```bash
sendbird --profile prod --json chat sdk user dnd get --as-user <USER_ID>
```

Both `--schedules` and `--timezone` are required. `--schedules` is a JSON object with weekday keys from `sunday` through `saturday`. Each day contains an array of up to ten time ranges with these required integer fields:

| Field         | Allowed values |
| ------------- | -------------- |
| start\_hour   | 0 to 23.       |
| start\_minute | 0 to 59.       |
| end\_hour     | 0 to 23.       |
| end\_minute   | 0 to 59.       |

Split a range that crosses midnight into ranges within each day. `--timezone` is a nonempty timezone string; this example uses `Asia/Seoul`.

This input sets Do Not Disturb on Mondays from 22:00 to 23:00. Keep the quotes around the JSON object so the shell passes it as one argument. Preview the change, then apply it and read the schedule again:

```bash
sendbird --profile prod --json chat sdk user dnd set --as-user <USER_ID> --schedules '{"monday":[{"start_hour":22,"start_minute":0,"end_hour":23,"end_minute":0}]}' --timezone Asia/Seoul --dry-run
sendbird --profile prod --json chat sdk user dnd set --as-user <USER_ID> --schedules '{"monday":[{"start_hour":22,"start_minute":0,"end_hour":23,"end_minute":0}]}' --timezone Asia/Seoul
sendbird --profile prod --json chat sdk user dnd get --as-user <USER_ID>
```

The read result contains `result.enabled`, `result.timezone`, and `result.schedules`. Check that the timezone and schedule match what you intended. An empty schedules object, `{}`, turns Do Not Disturb off. To restore the earlier schedule, run the set command with the values you saved.

## SDK polls

| Command                                | Purpose                                                                                          | Command-specific inputs                                                                                                                                       |
| -------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat sdk poll list`          | List one page of polls in a Group channel.                                                       | `--type <value>` `--id <value>` `--limit <value>` `--page <value>`                                                                                            |
| `sendbird chat sdk poll vote`          | Vote for poll options as the connected user.                                                     | `--type <value>` `--id <value>` `--poll-id <value>` `--option-ids <value>`                                                                                    |
| `sendbird chat sdk poll option add`    | Add an option to a poll, if the channel allows it.                                               | `--type <value>` `--id <value>` `--poll-id <value>` `--option <value>`                                                                                        |
| `sendbird chat sdk poll option update` | Update a poll option, as the poll's creator or a channel operator.                               | `--type <value>` `--id <value>` `--poll-id <value>` `--option-id <value>` `--text <value>`                                                                    |
| `sendbird chat sdk poll option delete` | Delete a poll option, as the poll's creator or a channel operator.                               | `--type <value>` `--id <value>` `--poll-id <value>` `--option-id <value>`                                                                                     |
| `sendbird chat sdk poll create`        | Create a poll that isn't attached to a message. To attach it, use `chat message send --poll-id`. | `--title <value>` `--allow-multiple-votes <value>` `--allow-user-suggestion <value>` `--close-at <value>` `--options <value>`                                 |
| `sendbird chat sdk poll get`           | Get a poll in the selected Group channel.                                                        | `--type <value>` `--id <value>` `--poll-id <value>`                                                                                                           |
| `sendbird chat sdk poll update`        | Update a poll in the selected Group channel.                                                     | `--type <value>` `--id <value>` `--poll-id <value>` `--title <value>` `--allow-multiple-votes <value>` `--allow-user-suggestion <value>` `--close-at <value>` |
| `sendbird chat sdk poll close`         | Close a poll in the selected Group channel.                                                      | `--type <value>` `--id <value>` `--poll-id <value>`                                                                                                           |
| `sendbird chat sdk poll delete`        | Delete a poll in the selected Group channel.                                                     | `--type <value>` `--id <value>` `--poll-id <value>`                                                                                                           |
| `sendbird chat sdk poll voters list`   | List one page of voters for a poll option.                                                       | `--type <value>` `--id <value>` `--poll-id <value>` `--option-id <value>` `--limit <value>` `--page <value>`                                                  |

## SDK reports

| Command                            | Purpose                                                                              | Command-specific inputs                                                                             |
| ---------------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| `sendbird chat sdk report channel` | Submit a channel report as the connected user; this is a real moderation submission. | `--type <value>` `--id <value>` `--category <value>` `--description <value>`                        |
| `sendbird chat sdk report user`    | Submit a user report as the connected user; this is a real moderation submission.    | `--type <value>` `--id <value>` `--user-id <value>` `--category <value>` `--description <value>`    |
| `sendbird chat sdk report message` | Submit a message report as the connected user; this is a real moderation submission. | `--type <value>` `--id <value>` `--message-id <value>` `--category <value>` `--description <value>` |

## Chat settings

| Command                                | Purpose                                                                                  | Command-specific inputs                                                                                                                                                                                                                                        |
| -------------------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat settings get`           | Read Chat settings.                                                                      | No command-specific options.                                                                                                                                                                                                                                   |
| `sendbird chat settings update`        | Update global moderation and channel defaults; read and preserve current settings first. | `--profanity-filter <value>` `--image-moderation <value>` `--display-past-message <value>` `--max-message-length <value>` `--user-messages-per-channel <value>` `--user-messages-per-channel-duration <value>` `--allow-links <value>`                         |
| `sendbird chat settings custom list`   | List settings for channel custom types.                                                  | `--limit <value>` `--token <value>`                                                                                                                                                                                                                            |
| `sendbird chat settings custom get`    | Read the settings for one channel custom type.                                           | `--custom-type <value>`                                                                                                                                                                                                                                        |
| `sendbird chat settings custom create` | Create settings for a channel custom type.                                               | `--custom-type <value>` `--profanity-filter <value>` `--image-moderation <value>` `--display-past-message <value>` `--max-message-length <value>` `--user-messages-per-channel <value>` `--user-messages-per-channel-duration <value>` `--allow-links <value>` |
| `sendbird chat settings custom update` | Update the settings for a channel custom type.                                           | `--custom-type <value>` `--profanity-filter <value>` `--image-moderation <value>` `--display-past-message <value>` `--max-message-length <value>` `--user-messages-per-channel <value>` `--user-messages-per-channel-duration <value>` `--allow-links <value>` |

## Chat webhooks

| Command                            | Purpose                                                                 | Command-specific inputs                                                                                                                                    |
| ---------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat webhook get`        | Read Chat webhook settings with the callback URL masked.                | No command-specific options.                                                                                                                               |
| `sendbird chat webhook categories` | List the Chat webhook event categories.                                 | `--display-all-webhook-categories <value>`                                                                                                                 |
| `sendbird chat webhook update`     | Update Chat event webhook; URL is accepted only in a private body file. | `--enabled <value>` `--enabled-events <value>` `--include-members <value>` `--include-unread-count <value>` `--events-to-include-channel-metadata <value>` |

### Update a Chat webhook

Use `chat webhook update` to change the app's Chat webhook settings. First read the current settings and keep them so you can restore them. Use an approved callback endpoint.

```bash
sendbird --profile prod --json chat webhook get
```

The request body has these fields. Put the callback URL in a private JSON file rather than a command argument.

| Field                                  | Required | Format                                                                                                                           |
| -------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| enabled                                | Yes      | Boolean.                                                                                                                         |
| url                                    | Yes      | HTTPS URL for the callback endpoint, without credentials in it. An empty string `""` is accepted only when `enabled` is `false`. |
| include\_members                       | Yes      | Boolean.                                                                                                                         |
| include\_unread\_count                 | Yes      | Boolean.                                                                                                                         |
| enabled\_events                        | No       | Array of up to 100 nonempty event strings.                                                                                       |
| events\_to\_include\_channel\_metadata | No       | Array of up to 100 nonempty event strings.                                                                                       |

For example, this body turns the webhook off. Save it to a private file and replace the example URL with your endpoint.

```json
{
  "enabled": false,
  "url": "https://example.com/sendbird/webhook",
  "include_members": false,
  "include_unread_count": false
}
```

Replace `/ABSOLUTE/PRIVATE/webhook.json` below with that file's path. Preview the request, check the target and values, then apply the change and read the settings again:

```bash
sendbird --profile prod --json chat webhook update --body-file /ABSOLUTE/PRIVATE/webhook.json --dry-run
sendbird --profile prod --json chat webhook update --body-file /ABSOLUTE/PRIVATE/webhook.json --yes
sendbird --profile prod --json chat webhook get
```

The result contains `result.webhook`, including `enabled` and `url`, with the URL masked. Check that `enabled` and the event settings match what you intended.

## Chat push notifications

| Command                              | Purpose                                                                                                     | Command-specific inputs                                                                                                                                                                                                                 |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat push settings update` | Update Chat push settings.                                                                                  | `--always-push <value>` `--include-channel-unread-count <value>`                                                                                                                                                                        |
| `sendbird chat push template set`    | Set a Chat push template.                                                                                   | `--template-name <value>` `--template <value>`                                                                                                                                                                                          |
| `sendbird chat push test send`       | Send a real Chat push test to an authorized device.                                                         | `--channel-url <value>` `--user-id <value>` `--message <value>` `--provider-id <value>` `--use-fcm-v1-api <value>`                                                                                                                      |
| `sendbird chat push test get`        | Read a Chat push test job.                                                                                  | `--channel-url <value>` `--msg-id <value>` `--provider-id <value>`                                                                                                                                                                      |
| `sendbird chat push list`            | List Chat push provider credentials; separate from Calls VoIP providers.                                    | `--push-type <value>` `--limit <value>` `--token <value>` `--paginated <value>`                                                                                                                                                         |
| `sendbird chat push create`          | Create Chat push provider credentials; separate from Calls VoIP providers.                                  | `--credential-file <path>` `--push-type <value>` `--format <value>` `--environment <value>` `--apns-bundle-id <value>` `--apns-key-id <value>` `--apns-team-id <value>` `--huawei-app-id <value>` `--push-sound <value>`                |
| `sendbird chat push update`          | Update Chat push provider credentials; separate from Calls VoIP providers.                                  | `--credential-file <path>` `--push-type <value>` `--id <value>` `--format <value>` `--environment <value>` `--apns-bundle-id <value>` `--apns-key-id <value>` `--apns-team-id <value>` `--huawei-app-id <value>` `--push-sound <value>` |
| `sendbird chat push delete`          | Delete Chat push provider credentials; separate from Calls VoIP providers.                                  | `--push-type <value>` `--id <value>`                                                                                                                                                                                                    |
| `sendbird chat push enabled get`     | Read the push switch shared by Chat and Calls.                                                              | No command-specific options.                                                                                                                                                                                                            |
| `sendbird chat push enabled set`     | Turn the push switch shared by Chat and Calls on or off. Requires `--confirm-shared-push true` and `--yes`. | `--confirm-shared-push <value>` `--push-enabled <value>`                                                                                                                                                                                |

## Chat announcements

| Command                                  | Purpose                                                                                                           | Command-specific inputs                                                                                                                                                                                      |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sendbird chat announcement create`      | Send or schedule an announcement to the targets you specify. Requires `--yes`.                                    | `--message <value>` `--target-at <value>` `--target-list <value>` `--target-channel-type <value>` `--create-channel <value>` `--enable-push <value>` `--scheduled-at <value>` `--announcement-group <value>` |
| `sendbird chat announcement list`        | List announcements.                                                                                               | `--limit <value>` `--token <value>` `--status <value>`                                                                                                                                                       |
| `sendbird chat announcement get`         | Read one announcement.                                                                                            | `--id <value>`                                                                                                                                                                                               |
| `sendbird chat announcement update`      | Update announcement fields; legacy version differences may be rejected by the server.                             | `--id <value>` `--message <value>` `--enable-push <value>` `--scheduled-at <value>` `--end-at <value>` `--cease-at <value>` `--resume-at <value>` `--announcement-group <value>`                             |
| `sendbird chat announcement action`      | Pause, resume, cancel, or stop an announcement. If the result is unclear, read the announcement before you retry. | `--id <value>` `--action <value>`                                                                                                                                                                            |
| `sendbird chat announcement groups list` | List announcement groups.                                                                                         | `--limit <value>` `--token <value>`                                                                                                                                                                          |
| `sendbird chat announcement open-status` | Read an announcement's open status.                                                                               | `--id <value>` `--limit <value>` `--token <value>`                                                                                                                                                           |
| `sendbird chat announcement open-rate`   | Read an announcement's open rate.                                                                                 | `--id <value>`                                                                                                                                                                                               |

## Chat moderation

| Command                                           | Purpose                                                                                                                                                            | Command-specific inputs                                                                                                                                                              |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sendbird chat moderation keywords global list`   | List the app's blocked keywords.                                                                                                                                   | No command-specific options.                                                                                                                                                         |
| `sendbird chat moderation keywords global add`    | Add blocked keywords for the app.                                                                                                                                  | `--keyword <value>`                                                                                                                                                                  |
| `sendbird chat moderation keywords global delete` | Delete blocked keywords for the app.                                                                                                                               | `--keyword <value>`                                                                                                                                                                  |
| `sendbird chat moderation keywords custom list`   | List blocked keywords for a channel custom type.                                                                                                                   | `--custom-type <value>`                                                                                                                                                              |
| `sendbird chat moderation keywords custom add`    | Add blocked keywords for a channel custom type.                                                                                                                    | `--custom-type <value>` `--keyword <value>`                                                                                                                                          |
| `sendbird chat moderation keywords custom delete` | Delete blocked keywords for a channel custom type.                                                                                                                 | `--custom-type <value>` `--keyword <value>`                                                                                                                                          |
| `sendbird chat moderation channel banned list`    | List banned users with your account's Sendbird Dashboard moderation permission. No Chat user token is required.                                                    | `--type <value>` `--id <value>` `--limit <value>` `--token <value>`                                                                                                                  |
| `sendbird chat moderation channel banned get`     | Read one ban record. If no record exists, other restrictions can still apply.                                                                                      | `--type <value>` `--id <value>` `--user-id <value>`                                                                                                                                  |
| `sendbird chat moderation channel ban`            | Ban one user with an explicit duration in seconds (-1 means indefinite).                                                                                           | `--type <value>` `--id <value>` `--user-id <value>` `--seconds <value>` `--description <value>`                                                                                      |
| `sendbird chat moderation channel unban`          | Unban a user from a channel.                                                                                                                                       | `--type <value>` `--id <value>` `--user-id <value>`                                                                                                                                  |
| `sendbird chat moderation channel muted list`     | List muted users with your account's Sendbird Dashboard moderation permission. No Chat user token is required.                                                     | `--type <value>` `--id <value>` `--limit <value>` `--token <value>`                                                                                                                  |
| `sendbird chat moderation channel muted get`      | Read one mute record. If no record exists, other restrictions can still apply.                                                                                     | `--type <value>` `--id <value>` `--user-id <value>`                                                                                                                                  |
| `sendbird chat moderation channel mute`           | Mute one user with an explicit duration in seconds (-1 means indefinite).                                                                                          | `--type <value>` `--id <value>` `--user-id <value>` `--seconds <value>` `--description <value>`                                                                                      |
| `sendbird chat moderation channel unmute`         | Unmute a user in a channel.                                                                                                                                        | `--type <value>` `--id <value>` `--user-id <value>`                                                                                                                                  |
| `sendbird chat moderation channel freeze`         | Freeze or unfreeze a channel with your account's Sendbird Dashboard moderation permission.                                                                         | `--type <value>` `--id <value>` `--freeze <value>`                                                                                                                                   |
| `sendbird chat moderation channel operators add`  | Add channel operators as your account. Review the current operators first.                                                                                         | `--type <value>` `--id <value>` `--operator-ids <value>`                                                                                                                             |
| `sendbird chat moderation message search`         | Search all app messages with your account's Sendbird Dashboard message search permission. Unlike `chat message search`, this isn't limited to one user's channels. | `--keyword <value>` `--channel-url <value>` `--user-id <value>` `--start-timestamp <value>` `--end-timestamp <value>` `--exclude-removed <value>` `--page <value>` `--limit <value>` |

## Chat analytics

| Command                              | Purpose                                                                                 | Command-specific inputs                                                                                                                                                                                                       |
| ------------------------------------ | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendbird chat analytics metric get` | Read one page of an analytics metric. To get the next page, pass `next` with `--token`. | `--metric-type <value>` `--time-dimension <value>` `--start-year <value>` `--end-year <value>` `--start-month <value>` `--end-month <value>` `--start-day <value>` `--end-day <value>` `--segments <value>` `--token <value>` |

## Usage

| Command                   | Purpose                                                              | Command-specific inputs                       |
| ------------------------- | -------------------------------------------------------------------- | --------------------------------------------- |
| `sendbird usage chat org` | Read monthly Chat feature usage for the selected organization.       | `--start-month <value>` `--end-month <value>` |
| `sendbird usage chat app` | Read one application's monthly Chat usage with organization context. | `--target-month <value>`                      |
