Skip to main content
POST
/
forum_posts
Create forum post
curl --request POST \
  --url https://api.whop.com/api/v1/forum_posts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "experience_id": "exp_xxxxxxxxxxxxxx",
  "attachments": [
    {
      "id": "<string>"
    }
  ],
  "company_id": "biz_xxxxxxxxxxxxxx",
  "content": "<string>",
  "is_mention": true,
  "parent_id": "<string>",
  "paywall_amount": 6.9,
  "pinned": true,
  "poll": {
    "options": [
      {
        "id": "<string>",
        "text": "<string>"
      }
    ]
  },
  "rich_content": "<string>",
  "title": "<string>"
}
'
import requests

url = "https://api.whop.com/api/v1/forum_posts"

payload = {
"experience_id": "exp_xxxxxxxxxxxxxx",
"attachments": [{ "id": "<string>" }],
"company_id": "biz_xxxxxxxxxxxxxx",
"content": "<string>",
"is_mention": True,
"parent_id": "<string>",
"paywall_amount": 6.9,
"pinned": True,
"poll": { "options": [
{
"id": "<string>",
"text": "<string>"
}
] },
"rich_content": "<string>",
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
experience_id: 'exp_xxxxxxxxxxxxxx',
attachments: [{id: '<string>'}],
company_id: 'biz_xxxxxxxxxxxxxx',
content: '<string>',
is_mention: true,
parent_id: '<string>',
paywall_amount: 6.9,
pinned: true,
poll: {options: [{id: '<string>', text: '<string>'}]},
rich_content: '<string>',
title: '<string>'
})
};

fetch('https://api.whop.com/api/v1/forum_posts', 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/forum_posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'experience_id' => 'exp_xxxxxxxxxxxxxx',
'attachments' => [
[
'id' => '<string>'
]
],
'company_id' => 'biz_xxxxxxxxxxxxxx',
'content' => '<string>',
'is_mention' => true,
'parent_id' => '<string>',
'paywall_amount' => 6.9,
'pinned' => true,
'poll' => [
'options' => [
[
'id' => '<string>',
'text' => '<string>'
]
]
],
'rich_content' => '<string>',
'title' => '<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/forum_posts"

payload := strings.NewReader("{\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"company_id\": \"biz_xxxxxxxxxxxxxx\",\n \"content\": \"<string>\",\n \"is_mention\": true,\n \"parent_id\": \"<string>\",\n \"paywall_amount\": 6.9,\n \"pinned\": true,\n \"poll\": {\n \"options\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n },\n \"rich_content\": \"<string>\",\n \"title\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://api.whop.com/api/v1/forum_posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"company_id\": \"biz_xxxxxxxxxxxxxx\",\n \"content\": \"<string>\",\n \"is_mention\": true,\n \"parent_id\": \"<string>\",\n \"paywall_amount\": 6.9,\n \"pinned\": true,\n \"poll\": {\n \"options\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n },\n \"rich_content\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.whop.com/api/v1/forum_posts")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"experience_id\": \"exp_xxxxxxxxxxxxxx\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"company_id\": \"biz_xxxxxxxxxxxxxx\",\n \"content\": \"<string>\",\n \"is_mention\": true,\n \"parent_id\": \"<string>\",\n \"paywall_amount\": 6.9,\n \"pinned\": true,\n \"poll\": {\n \"options\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n },\n \"rich_content\": \"<string>\",\n \"title\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "attachments": [
    {
      "content_type": "image/jpeg",
      "filename": "document.pdf",
      "id": "<string>",
      "url": "https://media.whop.com/abc123/optimized.jpg"
    }
  ],
  "comment_count": 42,
  "content": "## My Strategy\n\nHere are the key steps...",
  "created_at": "2023-12-01T05:00:00.401Z",
  "id": "<string>",
  "is_edited": true,
  "is_pinned": true,
  "is_poster_admin": true,
  "like_count": 42,
  "parent_id": "<string>",
  "title": "Weekly Market Analysis - February 2025",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "view_count": 42
}
{
"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 ***************************

Body

application/json

Parameters for CreateForumPostV2

experience_id
string
required

The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with company_id to automatically use the company's public forum.

Example:

"exp_xxxxxxxxxxxxxx"

attachments
FileInputWithId · object[] | null

A list of file attachments to include with the post, such as images or videos.

company_id
string | null

The unique identifier of the company whose public forum to post in. Required when experience_id is 'public'. For example, 'biz_xxxxx'.

Example:

"biz_xxxxxxxxxxxxxx"

content
string | null

The main body of the post in Markdown format. For example, 'Check out this update'. Hidden if the post is paywalled and the viewer has not purchased access.

is_mention
boolean | null

Whether to send this post as a mention notification to all users in the experience who have mentions enabled.

parent_id
string | null

The unique identifier of the parent post to comment on. Omit this field to create a top-level post.

paywall_amount
number | null

The price to unlock this post in the specified paywall currency. For example, 5.00 for $5.00. When set, users must purchase access to view the post content.

Example:

6.9

paywall_currency
enum<string> | null

The currency for the paywall price on this post. When set along with paywall_amount, users must purchase access to view the post content.

Available options:
usd,
sgd,
inr,
aud,
brl,
cad,
dkk,
eur,
nok,
gbp,
sek,
chf,
hkd,
huf,
jpy,
mxn,
myr,
pln,
czk,
nzd,
aed,
eth,
ape,
cop,
ron,
thb,
bgn,
idr,
dop,
php,
try,
krw,
twd,
vnd,
pkr,
clp,
uyu,
ars,
zar,
dzd,
tnd,
mad,
kes,
kwd,
jod,
all,
xcd,
amd,
bsd,
bhd,
bob,
bam,
khr,
crc,
xof,
egp,
etb,
gmd,
ghs,
gtq,
gyd,
ils,
jmd,
mop,
mga,
mur,
mdl,
mnt,
nad,
ngn,
mkd,
omr,
pyg,
pen,
qar,
rwf,
sar,
rsd,
lkr,
tzs,
ttd,
uzs,
rub,
btc,
cny,
usdt,
kzt,
awg,
whop_usd,
xau
pinned
boolean | null

Whether this post should be pinned to the top of the forum.

poll
object | null

A poll to attach to this post, allowing members to vote on options.

rich_content
string | null

The rich content of the post in Tiptap JSON format. When provided, takes priority over the markdown content field for rendering.

title
string | null

The title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.

visibility
enum<string> | null

Controls who can see this forum post, such as members only or public.

Available options:
members_only,
globally_visible

Response

A successful response

A post or comment in a forum feed, supporting rich text, attachments, polls, and reactions.

attachments
object[]
required

All file attachments on this post, such as images, documents, and videos.

comment_count
integer
required

The total number of direct comments on this post.

Example:

42

content
string | null
required

The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.

Example:

"## My Strategy\n\nHere are the key steps..."

created_at
string<date-time>
required

The time this post was created, as a Unix timestamp.

Example:

"2023-12-01T05:00:00.401Z"

id
string
required

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

is_edited
boolean
required

Whether this post has been edited after its initial creation.

is_pinned
boolean
required

Whether this post is pinned to the top of the forum feed.

is_poster_admin
boolean
required

Whether the author of this post is an admin of the company that owns the forum.

like_count
integer | null
required

The total number of like reactions this post has received.

Example:

42

parent_id
string | null
required

The unique identifier of the parent post. Null if this is a top-level post.

title
string | null
required

The headline of the forum post. Null if the post has no title.

Example:

"Weekly Market Analysis - February 2025"

updated_at
string<date-time>
required

The time this post was last updated, as a Unix timestamp.

Example:

"2023-12-01T05:00:00.401Z"

user
object
required

The user who authored this forum post.

view_count
integer | null
required

The total number of times this post has been viewed by users.

Example:

42