# Method: spaces.messages.delete

- [HTTP request](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#body.request_body)
- [Response body](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#body.aspect)
- [Try it!](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete#try-it)

Deletes a message. For an example, see [Delete a message](https://developers.google.com/workspace/chat/delete-messages).

Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):

- [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with the authorization scope:

  - `https://www.googleapis.com/auth/chat.bot`
- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes:

  - `https://www.googleapis.com/auth/chat.messages`
  - `https://www.googleapis.com/auth/chat.import` (import mode spaces only)

When using app authentication, requests can only delete messages created by the calling Chat app.

### HTTP request

`DELETE https://chat.googleapis.com/v1/{name=spaces/*/messages/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{message}`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). |

### Query parameters

| Parameters ||
|---|---|
| `force` | `boolean` Optional. When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Has no effect when [authenticating as a Chat app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). |

### Request body

The request body must be empty.

### Response body

If successful, the response body is an empty JSON object.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/chat.bot`
- `https://www.googleapis.com/auth/chat.import`
- `https://www.googleapis.com/auth/chat.messages`

For more information, see the [Authorization guide](https://developers.google.com/workspace/chat/authenticate-authorize).