Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
HTTP request
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchDelete
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
userId |
The user's email address. The special value |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "ids": [ string ] } |
Fields | |
---|---|
ids[] |
The IDs of the messages to delete. |
Response body
If successful, the response body is empty.
Authorization scopes
Requires the following OAuth scope:
https://mail.google.com/
For more information, see the Authorization guide.