Skip to main content
PATCH
/
chat_channels
/
{id}
JavaScript
import Whopsdk from 'whopsdk';

const client = new Whopsdk({
  apiKey: 'My API Key',
});

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

console.log(chatChannel.id);
{
  "id": "<string>",
  "experience": {
    "id": "exp_xxxxxxxxxxxxxx",
    "name": "<string>"
  },
  "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

The app API key from an app from the /dashboard/developer page

Path Parameters

id
string
required

Body

application/json

Parameters for UpdateChatChannel

ban_media
boolean | null

Whether media uploads are banned in this chat

ban_urls
boolean | null

Whether URLs are banned in this chat

banned_words
string[] | null

List of banned words for 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.

user_posts_cooldown_seconds
integer | null

The cooldown period in seconds between user posts

Example:

42

who_can_post
enum<string> | null

Who can post in this chat Who can post on a chat feed

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

Who can react to messages in this chat Who can react on a chat feed

Available options:
everyone,
no_one

Response

A successful response

Represents a Chat feed

id
string
required

The unique identifier for the entity

experience
object
required

The experience for this chat

ban_media
boolean
required

Whether or not media is banned in this chat

ban_urls
boolean
required

Whether or not URLs are banned in this chat

who_can_post
enum<string>
required

Who can post on this chat

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

Who can react on this chat

Available options:
everyone,
no_one
user_posts_cooldown_seconds
integer | null
required

The number of seconds a user needs to wait before posting again, if any

Example:

42

banned_words
string[]
required

List of banned words 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.

I