# Method: albums.batchRemoveMediaItems

- [HTTP request](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#body.request_body)
  - [JSON representation](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#body.response_body)
- [Authorization scopes](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#body.aspect)
- [Try it!](https://developers.google.com/photos/library/legacy/reference/rest/v1/albums/batchRemoveMediaItems#try-it)

Removes one or more media items from a specified album. The media items and the album must have been created by the developer via the API.

For albums that are shared, this action is only supported for media items that were added to the album by this user, or for all media items if the album was created by this user.

Partial success is not supported. The entire request will fail and no action will be performed on the album if an invalid media item or album is specified.

### HTTP request

`POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:batchRemoveMediaItems`

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

### Path parameters

| Parameters ||
|---|---|
| `albumId` | `string` Required. Identifier of the `https://developers.google.com/photos/library/legacy/reference/rest/v1/albums#Album` that the media items are to be removed from. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "mediaItemIds": [ string ] } ``` |

| Fields ||
|---|---|
| `mediaItemIds[]` | `string` Required. Identifiers of the `https://developers.google.com/photos/library/legacy/reference/rest/v1/mediaItems#MediaItem`s to be removed. Must not contain repeated identifiers and cannot be empty. The maximum number of media items that can be removed in one call is 50. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/photoslibrary`