Skip to main content
PATCH
/
forums
/
{id}
Update forum
curl --request PATCH \
  --url https://api.whop.com/api/v1/forums/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "banned_words": [
    "<string>"
  ],
  "banner_image": {
    "id": "<string>"
  }
}
'
import requests

url = "https://api.whop.com/api/v1/forums/{id}"

payload = {
"banned_words": ["<string>"],
"banner_image": { "id": "<string>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({banned_words: ['<string>'], banner_image: {id: '<string>'}})
};

fetch('https://api.whop.com/api/v1/forums/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/forums/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'banned_words' => [
'<string>'
],
'banner_image' => [
'id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.whop.com/api/v1/forums/{id}"

payload := strings.NewReader("{\n \"banned_words\": [\n \"<string>\"\n ],\n \"banner_image\": {\n \"id\": \"<string>\"\n }\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.whop.com/api/v1/forums/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"banned_words\": [\n \"<string>\"\n ],\n \"banner_image\": {\n \"id\": \"<string>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/forums/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"banned_words\": [\n \"<string>\"\n ],\n \"banner_image\": {\n \"id\": \"<string>\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "experience": {
    "id": "exp_xxxxxxxxxxxxxx",
    "name": "Trading Signals Chat"
  },
  "id": "<string>"
}
{
"error": {
"code": "parameter_missing",
"message": "Missing required parameter: amount.",
"param": "amount",
"type": "invalid_request_error"
}
}
{
"error": {
"message": "Invalid or missing API key",
"type": "unauthorized"
}
}
{
"error": {
"message": "You do not have permission to access this resource",
"type": "forbidden"
}
}
{
"error": {
"message": "Resource not found",
"type": "not_found"
}
}
{
"error": null
}
{
"error": null
}
{
"error": {
"message": "An unexpected error occurred",
"type": "internal_server_error"
}
}

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 forum to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a forum ID.

Body

application/json

Parameters for UpdateForum

banned_words
string[] | null

A list of words that are automatically blocked from posts in this forum. 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.

banner_image
FileInputWithId · object | null

The banner image displayed at the top of the forum page. Pass null to remove the existing banner.

email_notification_preference
enum<string> | null

Controls how email notifications are sent to members when new posts are created in this forum.

Available options:
all_admin_posts,
only_weekly_summary,
none
who_can_comment
enum<string> | null

Controls which roles are allowed to comment on posts in this forum.

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

Controls which roles are allowed to create new posts in this forum.

Available options:
everyone,
admins

Response

A successful response

A discussion forum where members can create posts, comment, and react, belonging to an experience.

email_notification_preference
enum<string>
required

The email notification setting that controls which posts trigger email alerts. One of: all_admin_posts, only_weekly_summary, none.

Available options:
all_admin_posts,
only_weekly_summary,
none
experience
object
required

The parent experience that this forum belongs to.

id
string
required

The unique identifier for the entity

who_can_comment
enum<string>
required

The permission level controlling who can comment on posts. One of: everyone, admins.

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

The permission level controlling who can create new posts. One of: everyone, admins.

Available options:
everyone,
admins