Skip to main content
PATCH
/
chat_channels
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const chatChannel = await client.chatChannels.update('id');

console.log(chatChannel.id);
{
  "id": "<string>",
  "experience": {
    "id": "exp_xxxxxxxxxxxxxx",
    "name": "Trading Signals Chat"
  },
  "ban_media": true,
  "ban_urls": true,
  "who_can_post": "everyone",
  "who_can_react": "everyone",
  "user_posts_cooldown_seconds": 42,
  "banned_words": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Path Parameters

id
string
required

The unique identifier of the chat channel to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a chat channel ID.

Body

application/json

Parameters for UpdateChatChannel

ban_media
boolean | null

Whether media uploads such as images and videos are banned in this chat channel.

ban_urls
boolean | null

Whether URLs and links are banned from being posted in this chat channel.

banned_words
string[] | null

A list of words that are automatically blocked from messages in this chat channel. For example, ['spam', 'scam'].

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.

user_posts_cooldown_seconds
integer | null

The minimum number of seconds a user must wait between sending messages in this chat channel.

Example:

42

who_can_post
enum<string> | null

Controls which roles are allowed to send messages in this chat channel.

Available options:
everyone,
admins
who_can_react
enum<string> | null

Controls which roles are allowed to add reactions to messages in this chat channel.

Available options:
everyone,
no_one

Response

A successful response

A real-time chat feed attached to an experience, with configurable moderation and posting permissions.

id
string
required

The unique identifier for the entity

experience
object
required

The experience this chat feed is attached to.

ban_media
boolean
required

Whether media uploads such as images and videos are blocked in this chat.

ban_urls
boolean
required

Whether URL links are blocked from being posted in this chat.

who_can_post
enum<string>
required

The permission level controlling which users can send messages in this chat.

Available options:
everyone,
admins
who_can_react
enum<string>
required

The permission level controlling which users can add reactions in this chat.

Available options:
everyone,
no_one
user_posts_cooldown_seconds
integer | null
required

The minimum number of seconds a user must wait between consecutive messages. Null if no cooldown is enforced.

Example:

42

banned_words
string[]
required

A list of words that are automatically filtered from messages in this chat.

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.