Anytype icon

Anytype

Interact with the Anytype API

Chat → Edit Message

AI-generated

Summary

Edit an existing chat message in a specified chat within a space by updating its text content or providing a custom JSON body.

Inputs

  • Space ID (required) — Select the Space containing the chat.
  • Chat ID (required) — Select the Chat where the message exists, dependent on Space.
  • Message ID (required) — Provide the ID of the message to edit.
  • Body Mode (required) — Choose 'Simple' to update the text field directly, or 'JSON' to provide a raw JSON request body.
  • Text (required) — New message text to replace the existing text; used only if Body Mode is 'Simple'.
  • Body (JSON) (required) — Raw JSON body of the edit message request; used only if Body Mode is 'JSON'.

Output shape

a single record

Returns the updated message object unwrapped from the 'message' property in the API response. The message includes updated fields reflecting the edit.

Examples

Example 1: Update message text using simple mode

Set Space ID, Chat ID, and Message ID. Choose Body Mode 'Simple' and fill in the new Text.

Example 2: Edit message using a custom JSON body

Set Space ID, Chat ID, and Message ID. Choose Body Mode 'JSON' and provide the JSON structure for the message update.

Links

Discussion