## Delete a message `client.Messages.Delete(ctx, messageID, params) error` **delete** `/v1/chats/{chatID}/messages/{messageID}` Delete a message by final message ID. Pending message IDs are not accepted because messages cannot be deleted while sending. ### Parameters - `messageID string` Message ID. - `params MessageDeleteParams` - `ChatID param.Field[string]` Path param: Chat ID. Input routes also accept the local chat ID from this installation when available. - `ForEveryone param.Field[bool]` Query param: True to request deletion for everyone when the network supports it; false to delete only for the authenticated user when supported. ### Example ```go package main import ( "context" "github.com/beeper/desktop-api-go" "github.com/beeper/desktop-api-go/option" ) func main() { client := beeperdesktopapi.NewClient( option.WithAccessToken("My Access Token"), ) err := client.Messages.Delete( context.TODO(), "1343993", beeperdesktopapi.MessageDeleteParams{ ChatID: "!NCdzlIaMjZUmvmvyHU:beeper.com", }, ) if err != nil { panic(err.Error()) } } ```