---
title: "Edits a webhook message"
method: PATCH
path: "/webhooks/{webhook_id}/{token}/{message_id}"
tags: ["Webhooks"]
---

# Edits a webhook message

`PATCH /webhooks/{webhook_id}/{token}/{message_id}`

Edits a message sent by a webhook

## Path parameters

- `webhook_id` string, required
- `token` string, required
- `message_id` string, required

## Request body

- DataEditMessage — Changes to make to message
  - `content` string, nullable — New message content
  - `embeds` SendableEmbed[], nullable — Embeds to include in the message
    - `icon_url` string, nullable
    - `url` string, nullable
    - `title` string, nullable
    - `description` string, nullable
    - `media` string, nullable
    - `colour` string, nullable

## Response `200`

- Message — Message
  - `_id` string, required — Unique Id
  - `nonce` string, nullable — Unique value generated by client sending this message
  - `channel` string, required — Id of the channel this message was sent in
  - `author` string, required — Id of the user or webhook that sent this message
  - `user` User — User
    - `_id` string, required — Unique Id
    - `username` string, required — Username
    - `discriminator` string, required — Discriminator
    - `display_name` string, nullable — Display name
    - `pronouns` string, nullable — User's pronouns
    - `avatar` File — File
      - `_id` string, required — Unique Id
      - `tag` string, required — Tag / bucket this file was uploaded to
      - `filename` string, required — Original filename
      - `metadata` union, required — Metadata associated with a file
        - object — File is just a generic uncategorised file
          - `type` 'File', required
        - object — File contains textual data and should be displayed as such
          - `type` 'Text', required
        - object — File is an image with specific dimensions, and may be animated
          - `type` 'Image', required
          - `width` integer, required
          - `height` integer, required
          - `thumbhash` integer[], nullable
          - `animated` boolean, nullable
        - object — File is a video with specific dimensions
          - `type` 'Video', required
          - `width` integer, required
          - `height` integer, required
        - object — File is audio
          - `type` 'Audio', required
      - `content_type` string, required — Raw content type of this file
      - `size` integer, required — Size of this file (in bytes)
      - `deleted` boolean, nullable — Whether this file was deleted
      - `reported` boolean, nullable — Whether this file was reported
      - `message_id` string, nullable
      - `user_id` string, nullable
      - `server_id` string, nullable
      - `object_id` string, nullable — Id of the object this file is associated with
    - `relations` Relationship[] — Relationships with other users
      - `_id` string, required — Other user's Id
      - `status` union, required — User's relationship with another user (or themselves)
        - 'None' — No relationship with other user
        - 'User' — Other user is us
        - 'Friend' — Friends with the other user
        - 'Outgoing' — Pending friend request to user
        - 'Incoming' — Incoming friend request from user
        - 'Blocked' — Blocked this user
        - 'BlockedOther' — Blocked by this user
    - `badges` integer — Bitfield of user badges https://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserBadges.html
    - `status` UserStatus — User's active status
      - `text` string, nullable — Custom status text
      - `presence` union — Presence status
        - 'Online' — User is online
        - 'Idle' — User is not currently available
        - 'Focus' — User is focusing / will only receive mentions
        - 'Busy' — User is busy / will not receive any notifications
        - 'Invisible' — User appears to be offline
    - `flags` integer — Enum of user flags https://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserFlags.html
    - `privileged` boolean — Whether this user is privileged
    - `bot` BotInformation — Bot information for if the user is a bot
      - `owner` string, required — Id of the owner of this bot
    - `relationship` union, required — User's relationship with another user (or themselves)
      - 'None' — No relationship with other user
      - 'User' — Other user is us
      - 'Friend' — Friends with the other user
      - 'Outgoing' — Pending friend request to user
      - 'Incoming' — Incoming friend request from user
      - 'Blocked' — Blocked this user
      - 'BlockedOther' — Blocked by this user
    - `online` boolean, required — Whether this user is currently online
  - `member` Member — Server Member
    - `_id` MemberCompositeKey, required — Composite primary key consisting of server and user id
      - `server` string, required — Server Id
      - `user` string, required — User Id
    - `joined_at` string, date-time, required — ISO8601 formatted timestamp
    - `nickname` string, nullable — Member's nickname
    - `pronouns` string, nullable — Member's pronouns
    - `avatar` File — File
      - `_id` string, required — Unique Id
      - `tag` string, required — Tag / bucket this file was uploaded to
      - `filename` string, required — Original filename
      - `metadata` union, required — Metadata associated with a file
        - object — File is just a generic uncategorised file
          - `type` 'File', required
        - object — File contains textual data and should be displayed as such
          - `type` 'Text', required
        - object — File is an image with specific dimensions, and may be animated
          - `type` 'Image', required
          - `width` integer, required
          - `height` integer, required
          - `thumbhash` integer[], nullable
          - `animated` boolean, nullable
        - object — File is a video with specific dimensions
          - `type` 'Video', required
          - `width` integer, required
          - `height` integer, required
        - object — File is audio
          - `type` 'Audio', required
      - `content_type` string, required — Raw content type of this file
      - `size` integer, required — Size of this file (in bytes)
      - `deleted` boolean, nullable — Whether this file was deleted
      - `reported` boolean, nullable — Whether this file was reported
      - `message_id` string, nullable
      - `user_id` string, nullable
      - `server_id` string, nullable
      - `object_id` string, nullable — Id of the object this file is associated with
    - `roles` string[] — Member's roles
    - `timeout` string, date-time — ISO8601 formatted timestamp
    - `can_publish` boolean — Whether the member is server-wide voice muted
    - `can_receive` boolean — Whether the member is server-wide voice deafened
  - `webhook` MessageWebhook — Information about the webhook bundled with Message
    - `name` string, required
    - `avatar` string, nullable
  - `content` string, nullable — Message content
  - `system` union — System Event
    - object
      - `type` 'text', required
      - `content` string, required
    - object
      - `type` 'user_added', required
      - `id` string, required
      - `by` string, required
    - object
      - `type` 'user_remove', required
      - `id` string, required
      - `by` string, required
    - object
      - `type` 'user_joined', required
      - `id` string, required
    - object
      - `type` 'user_left', required
      - `id` string, required
    - object
      - `type` 'user_kicked', required
      - `id` string, required
    - object
      - `type` 'user_banned', required
      - `id` string, required
    - object
      - `type` 'channel_renamed', required
      - `name` string, required
      - `by` string, required
    - object
      - `type` 'channel_description_changed', required
      - `by` string, required
    - object
      - `type` 'channel_icon_changed', required
      - `by` string, required
    - object
      - `type` 'channel_ownership_changed', required
      - `from` string, required
      - `to` string, required
    - object
      - `type` 'message_pinned', required
      - `id` string, required
      - `by` string, required
    - object
      - `type` 'message_unpinned', required
      - `id` string, required
      - `by` string, required
    - object
      - `type` 'call_started', required
      - `by` string, required
      - `finished_at` string, date-time — ISO8601 formatted timestamp
  - `attachments` File[], nullable — Array of attachments
    - `_id` string, required — Unique Id
    - `tag` string, required — Tag / bucket this file was uploaded to
    - `filename` string, required — Original filename
    - `metadata` union, required — Metadata associated with a file
      - object — File is just a generic uncategorised file
        - `type` 'File', required
      - object — File contains textual data and should be displayed as such
        - `type` 'Text', required
      - object — File is an image with specific dimensions, and may be animated
        - `type` 'Image', required
        - `width` integer, required
        - `height` integer, required
        - `thumbhash` integer[], nullable
        - `animated` boolean, nullable
      - object — File is a video with specific dimensions
        - `type` 'Video', required
        - `width` integer, required
        - `height` integer, required
      - object — File is audio
        - `type` 'Audio', required
    - `content_type` string, required — Raw content type of this file
    - `size` integer, required — Size of this file (in bytes)
    - `deleted` boolean, nullable — Whether this file was deleted
    - `reported` boolean, nullable — Whether this file was reported
    - `message_id` string, nullable
    - `user_id` string, nullable
    - `server_id` string, nullable
    - `object_id` string, nullable — Id of the object this file is associated with
  - `edited` string, date-time — ISO8601 formatted timestamp
  - `embeds` Embed[], nullable — Attached embeds to this message
    - union — Embed
      - object — Website metadata
        - `type` 'Website', required
        - `url` string, nullable — Direct URL to web page
        - `original_url` string, nullable — Original direct URL
        - `special` union — Information about special remote content
          - object — No remote content
            - `type` 'None', required
          - object — Content hint that this contains a GIF Use metadata to find video or image to play
            - `type` 'GIF', required
          - object — YouTube video
            - `type` 'YouTube', required
            - `id` string, required
            - `creator_name` string, nullable
            - `creator_url` string, nullable
            - `timestamp` string, nullable
          - object — Lightspeed.tv stream
            - `type` 'Lightspeed', required
            - `content_type` 'Channel', required — Type of remote Lightspeed.tv content
            - `id` string, required
          - object — Twitch stream or clip
            - `type` 'Twitch', required
            - `content_type` 'Channel' | 'Video' | 'Clip', required — Type of remote Twitch content
            - `id` string, required
          - object — Spotify track
            - `type` 'Spotify', required
            - `content_type` string, required
            - `id` string, required
          - object — Soundcloud track
            - `type` 'Soundcloud', required
          - object — Bandcamp track
            - `type` 'Bandcamp', required
            - `content_type` 'Album' | 'Track', required — Type of remote Bandcamp content
            - `id` string, required
          - object
            - `type` 'AppleMusic', required
            - `album_id` string, required
            - `track_id` string, nullable
          - object — Streamable Video
            - `type` 'Streamable', required
            - `id` string, required
        - `title` string, nullable — Title of website
        - `description` string, nullable — Description of website
        - `image` Image — Image
          - `url` string, required — URL to the original image
          - `width` integer, required — Width of the image
          - `height` integer, required — Height of the image
          - `size` union, required — Image positioning and size
            - 'Large' — Show large preview at the bottom of the embed
            - 'Preview' — Show small preview to the side of the embed
        - `video` Video — Video
          - `url` string, required — URL to the original video
          - `width` integer, required — Width of the video
          - `height` integer, required — Height of the video
        - `site_name` string, nullable — Site name
        - `icon_url` string, nullable — URL to site icon
        - `colour` string, nullable — CSS Colour
      - object — Image
        - `type` 'Image', required
        - `url` string, required — URL to the original image
        - `width` integer, required — Width of the image
        - `height` integer, required — Height of the image
        - `size` union, required — Image positioning and size
          - 'Large' — Show large preview at the bottom of the embed
          - 'Preview' — Show small preview to the side of the embed
      - object — Video
        - `type` 'Video', required
        - `url` string, required — URL to the original video
        - `width` integer, required — Width of the video
        - `height` integer, required — Height of the video
      - object — Text Embed
        - `type` 'Text', required
        - `icon_url` string, nullable — URL to icon
        - `url` string, nullable — URL for title
        - `title` string, nullable — Title of text embed
        - `description` string, nullable — Description of text embed
        - `media` File — File
          - `_id` string, required — Unique Id
          - `tag` string, required — Tag / bucket this file was uploaded to
          - `filename` string, required — Original filename
          - `metadata` union, required — Metadata associated with a file
            - object — File is just a generic uncategorised file
              - …
            - object — File contains textual data and should be displayed as such
              - …
            - object — File is an image with specific dimensions, and may be animated
              - …
            - object — File is a video with specific dimensions
              - …
            - object — File is audio
              - …
          - `content_type` string, required — Raw content type of this file
          - `size` integer, required — Size of this file (in bytes)
          - `deleted` boolean, nullable — Whether this file was deleted
          - `reported` boolean, nullable — Whether this file was reported
          - `message_id` string, nullable
          - `user_id` string, nullable
          - `server_id` string, nullable
          - `object_id` string, nullable — Id of the object this file is associated with
        - `colour` string, nullable — CSS Colour
      - object
        - `type` 'None', required
  - `mentions` string[], nullable — Array of user ids mentioned in this message
  - `role_mentions` string[], nullable — Array of role ids mentioned in this message
  - `replies` string[], nullable — Array of message ids this message is replying to
  - `reactions` object — Hashmap of emoji IDs to array of user IDs
  - `interactions` Interactions — Information to guide interactions on this message
    - `reactions` string[], nullable — Reactions which should always appear and be distinct
    - `restrict_reactions` boolean — Whether reactions should be restricted to the given list Can only be set to true if reactions list is of at least length 1
  - `masquerade` Masquerade — Name and / or avatar override information
    - `name` string, nullable — Replace the display name shown on this message
    - `avatar` string, nullable — Replace the avatar shown on this message (URL to image file)
    - `colour` string, nullable — Replace the display role colour shown on this message Must have `ManageRole` permission to use
  - `pinned` boolean, nullable — Whether or not the message in pinned
  - `flags` integer — Bitfield of message flags https://docs.rs/revolt-models/latest/revolt_models/v0/enum.MessageFlags.html

## Other responses

- `default` — An error occurred.

---

[API](https://skmtc.net/revolt/apis/revolt-api.md) · [All operations](https://skmtc.net/revolt/apis/revolt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/revolt/revolt-api/versions/a235e4654b18/schema)
