Forum posts

Update forum post

Changed on

Edit the content, attachments, pinned status, or visibility of an existing forum post or comment.

patch/forum_posts/{id}

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required

The unique identifier of the forum post to update.

Request body

object required

Parameters for UpdateForumPost

attachments, object[] nullable

A replacement list of file attachments for this post, such as images or videos.

content, string nullable

The updated 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_pinned, boolean nullable

Whether this post should be pinned to the top of the forum. Only top-level posts can be pinned, not comments.

title, string nullable

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

visibility, 'members_only' | 'globally_visible' nullable

The visibility types for forum posts

Response

A successful response

ForumPost required

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.

content, string nullable required

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

created_at, string date-time required

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

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 nullable required

The total number of like reactions this post has received.

parent_id, string nullable required

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

title, string nullable required

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

updated_at, string date-time required

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

user, object required

The user who authored this forum post.

view_count, integer nullable required

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

Example response

{
  "attachments": [
    {
      "content_type": "image/jpeg",
      "filename": "document.pdf",
      "url": "https://media.whop.com/abc123/optimized.jpg"
    }
  ],
  "comment_count": 42,
  "content": "## Ceramic Coating Care\n\nHere are the key steps...",
  "created_at": "2023-12-01T05:00:00.401Z",
  "like_count": 42,
  "title": "Ceramic Coating Care - February 2025",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "Marcus Webb",
    "username": "marcuswebb"
  },
  "view_count": 42
}

Changes