Messages

Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel.

Required permissions (one of):

  • chat:message:create
  • dms:message:manage
  • livestream:chat:write
  • support_chat:message:create
patch/messages/{id}

Request

  • Base URL: https://api.whop.com/api/v1
  • URL: https://api.whop.com/api/v1/messages/{id}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring required

The unique identifier of the message to update.

Request body

contentstring nullable

The updated body of the message in Markdown format. For example, 'Hello world'.

is_pinnedboolean nullable

Whether this message should be pinned to the top of the channel.

Response

A successful response

contentstring nullable required

The message content formatted as Markdown. Null if the message has no text content.

created_atstring date-time required

The timestamp when this message was originally created.

idstring 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_editedboolean required

Whether the message content has been edited after it was originally sent.

is_pinnedboolean required

Whether this message is pinned to the top of the channel for easy access.

mentionsstring[] required

A list of user IDs that are explicitly mentioned in this message.

mentions_everyoneboolean required

Whether the message includes an @everyone mention that notifies all channel members.

message_type'regular' | 'system' | 'automated' required

The types of post

replying_to_message_idstring nullable required

The unique identifier of the message this post is replying to. Null if this is not a reply.

updated_atstring date-time required

The timestamp when this message was last modified.

view_countinteger nullable required

The number of unique views this message has received. Null if view tracking is not enabled for this channel.

Example response

{
  "content": "Hey, are you available for a **quick call**?",
  "created_at": "2023-12-01T05:00:00.401Z",
  "poll_votes": [
    {
      "count": 42
    }
  ],
  "reaction_counts": [
    {
      "count": 42
    }
  ],
  "updated_at": "2023-12-01T05:00:00.401Z",
  "user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "view_count": 42
}

Changes

    • info

      the security scope chat:message:create was added to the endpoint's security scheme bearerAuth

    • info

      the security scope support_chat:message:create was removed from the endpoint's security scheme bearerAuth

    • info

      the security scope chat:message:create was added to the endpoint's security scheme bearerAuth

    • info

      the security scope support_chat:message:create was removed from the endpoint's security scheme bearerAuth