---
title: "POST /users/{userId}/messages/batchDelete"
method: POST
path: "/users/{userId}/messages/batchDelete"
tags: ["users"]
---

# POST /users/{userId}/messages/batchDelete

`POST /users/{userId}/messages/batchDelete`

Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.

## Path parameters

- `userId` string, required

## Query parameters

- `$.xgafv` '1' | '2' — V1 error format
- `access_token` string
- `alt` 'json' | 'media' | 'proto' — Data format for response
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `upload_protocol` string
- `uploadType` string

## Request body

- BatchDeleteMessagesRequest
  - `ids` string[] — The IDs of the messages to delete

## Response `200`

Successful response

---

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