To delete up to 1,000 objects from a bucket in a single request, you make a POST
request to the bucket's URI and include the delete query string parameter. The
request body must contain an XML document that specifies the objects you want to
delete.
Query string parameters
This request includes the delete query string parameter.
Request headers
Include the following request headers:
| Header | Description | Required |
|---|---|---|
Authorization |
The authentication string for the request. | Yes |
Content-Length |
The size of the request body in bytes. | Yes |
Date |
The date and time of the request. | Yes |
Host |
The URI for Cloud Storage. For more information, see Request Endpoints. | Yes |
x-goog-user-project |
The project to be billed for charges associated with the request. | No |
Request body elements
The request body for a multi-object delete operation must be an XML document with the following elements:
| Element | Description |
|---|---|
Delete |
The container for the objects you want to delete. |
Object |
A container for a single object you want to delete. |
Key |
The name of the object to be deleted. |
VersionId (Optional) |
The version ID of the object to be deleted. If omitted, Cloud Storage attempts to delete the live version of the object. The result depends on whether Object Versioning or Soft delete are enabled for the bucket:
If you include |
Quiet (Optional) |
If set to
We recommend setting the
|
Request syntax
POST /?delete HTTP/1.1
Host: BUCKET_NAME.storage.googleapis.com
Date: DATE
Content-Length: REQUEST_BODY_LENGTH
Authorization: AUTHENTICATION_STRING
<Delete>
<Object>
<Key>OBJECT_NAME_1</Key>
<VersionId>VERSION_ID_1</VersionId>
</Object>
<Object>
<Key>OBJECT_NAME_2</Key>
<VersionId>VERSION_ID_2</VersionId>
</Object>
<Quiet>False</Quiet>
</Delete>
Response headers
The request can return a variety of response headers depending on the request headers you use.
Response body elements
The response body is an XML document that provides a status for each object you requested to delete.
| Element | Description |
|---|---|
DeleteResult |
The container for the entire response. |
Deleted |
A container for an object that was successfully deleted. If the |
Key |
The name of the successfully deleted object. |
VersionId |
The version ID of the successfully deleted object. |
Error |
A container for an object that wasn't deleted due to an error. |
Code |
The error code for the object that failed to delete. |
Message |
A detailed error message. |
Example
The following example attempts to delete multiple objects from a bucket named my-bucket. It includes the Quiet element set to False to receive a verbose response, showing two successfully deleted objects and a failed object deletion.
Request
POST /?delete HTTP/1.1
Host: my-bucket.storage.googleapis.com
Date: Thu, 12 Mar 2026 03:38:42 GMT
Content-Length: 1320
Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg
<Delete>
<Object>
<Key>image1.jpg</Key>
</Object>
<Object>
<Key>document.pdf</Key>
</Object>
<Object>
<Key>private/financial_data.xlsx</Key>
</Object>
<Quiet>False</Quiet>
</Delete>
Response
<DeleteResult> <Deleted> <Key>image1.jpg</Key> </Deleted> <Deleted> <Key>document.pdf</Key> </Deleted> <Error> <Code>AccessDenied</Code> <Key>private/financial_data.xlsx</Key> <Message>Access Denied. You don't have permission to delete this object.</Message> </Error> </DeleteResult>
What's next
- Learn about Object Versioning.
- Learn about Object Lifecycle Management for automated object deletions.
- Learn about storage batch operations for deleting more than 1,000 objects.
- Learn how to delete a bucket.