Users.messages: batchDelete

Requires authorization

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

Request

HTTP request

POST https://www.googleapis.com/gmail/v1/users/userId/messages/batchDelete

Parameters

Parameter name Value Description
Path parameters
userId string The user's email address. The special value me can be used to indicate the authenticated user.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://mail.google.com/

Request body

In the request body, supply data with the following structure:

{
  "ids": [
    string
  ]
}
Property name Value Description Notes
ids[] list The IDs of the messages to delete.

Response

If successful, this method returns an empty response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Enviar comentarios sobre…

¿Necesitas ayuda? Visita nuestra página de asistencia.