Skip to main content
POST
/
forum_posts
JavaScript
import Whopsdk from 'whopsdk';

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

const forumPost = await client.forumPosts.create({ experience_id: 'exp_xxxxxxxxxxxxxx' });

console.log(forumPost.id);
{
  "id": "<string>",
  "title": "<string>",
  "content": "<string>",
  "is_edited": true,
  "is_poster_admin": true,
  "is_pinned": true,
  "parent_id": "<string>",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "username": "<string>",
    "name": "<string>"
  },
  "view_count": 42,
  "like_count": 42,
  "comment_count": 42
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Parameters for CreateForumPostV2

experience_id
string
required

The experience to create this post in

Example:

"exp_xxxxxxxxxxxxxx"

content
string | null

This is the main body of the post in Markdown format. Hidden if paywalled and user hasn't purchased access to it.

title
string | null

The title of the post. Only visible if paywalled.

attachments
object[] | null

The attachments for this post

poll
object | null

The poll for this post

parent_id
string | null

The ID of the parent post. Set it to the ID of the post you want to comment on or don't include it if its a top level post.

pinned
boolean | null

Whether the post should be pinned

paywall_amount
number | null

The amount to paywall this post by. A paywalled post requires the user to purchase it in order to view its content.

Example:

6.9

paywall_currency
enum<string> | null

The currency to paywall this post by. A paywalled post requires the user to purchase it in order to view its content. The available currencies on the platform

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

This is used to determine if the post should be sent as a 'mention' notification to all of the users who are in the experience. This means that anyone with 'mentions' enabled will receive a notification about this post.

Response

A successful response

Represents a post in forum

id
string
required

The unique identifier for the entity

title
string | null
required

The title of the forum post

content
string | null
required

The content of the forum post in Markdown format

is_edited
boolean
required

Whether the forum post has been edited

is_poster_admin
boolean
required

Whether the user that sent the post is an admin of the bot

is_pinned
boolean
required

Whether this forum post is pinned

parent_id
string | null
required

The ID of the parent forum post, if applicable

user
object
required

The user who created this forum post

view_count
integer | null
required

The number of times this message has been viewed

Example:

42

like_count
integer | null
required

The number of likes this post has received

Example:

42

comment_count
integer
required

The amount of comments on this post

Example:

42

I