Skip to content
Download Beeper

Edit a message

client.Messages.Update(ctx, messageID, params) (*MessageUpdateResponse, error)
PUT/v1/chats/{chatID}/messages/{messageID}

Edit the text content of an existing message. Messages with attachments cannot be edited.

ParametersExpand Collapse
messageID string
params MessageUpdateParams
ChatID param.Field[string]

Path param: Unique identifier of the chat.

Text param.Field[string]

Body param: New text content for the message

minLength1
ReturnsExpand Collapse
type MessageUpdateResponse struct{…}
ChatID string

Unique identifier of the chat.

MessageID string

Message ID.

Success bool

Whether the message was successfully edited

Edit a message

package main

import (
  "context"
  "fmt"

  "github.com/beeper/desktop-api-go"
)

func main() {
  client := beeperdesktopapi.NewClient(

  )
  message, err := client.Messages.Update(
    context.TODO(),
    "messageID",
    beeperdesktopapi.MessageUpdateParams{
      ChatID: "!NCdzlIaMjZUmvmvyHU:beeper.com",
      Text: "x",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", message.ChatID)
}
{
  "chatID": "!signal_adamvy:local-signal.localhost",
  "messageID": "1343993",
  "success": true
}
Returns Examples
{
  "chatID": "!signal_adamvy:local-signal.localhost",
  "messageID": "1343993",
  "success": true
}