Skip to main content
POST
/
forum_posts
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 forumPost = await client.forumPosts.create({ experience_id: 'exp_xxxxxxxxxxxxxx' });

console.log(forumPost.id);
{
  "id": "<string>",
  "title": "Weekly Market Analysis - February 2025",
  "content": "## My Strategy\n\nHere are the key steps...",
  "created_at": "2023-12-01T05:00:00.401Z",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "is_edited": true,
  "is_poster_admin": true,
  "is_pinned": true,
  "parent_id": "<string>",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "username": "johndoe42",
    "name": "John Doe"
  },
  "view_count": 42,
  "like_count": 42,
  "comment_count": 42
}

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'.

Example:

"exp_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.

title
string | null

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

attachments
FileInputWithId · object[] | null

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

poll
object

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

parent_id
string | null

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

pinned
boolean | null

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

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
is_mention
boolean | null

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

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.

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.

title
string | null
required

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

Example:

"Weekly Market Analysis - February 2025"

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"

updated_at
string<date-time>
required

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

Example:

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

is_edited
boolean
required

Whether this post has been edited after its initial creation.

is_poster_admin
boolean
required

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

is_pinned
boolean
required

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

parent_id
string | null
required

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

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

like_count
integer | null
required

The total number of like reactions this post has received.

Example:

42

comment_count
integer
required

The total number of direct comments on this post.

Example:

42