# Method: albums.batchAddMediaItems

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

Adds one or more app created media items in a user's Google Photos library to an app created album. The media items and albums must have been created by the developer via the API.

Media items are added to the end of the album. If multiple media items are given, they are added in the order specified in this call.

Each album can contain up to 20,000 media items.

Partial success is not supported. The entire request will fail if an invalid media item or album is specified.

### HTTP request

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

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/reference/rest/v1/albums#Album` that the media items are added to. |

### 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/reference/rest/v1/mediaItems#MediaItem`s to be added. The maximum number of media items that can be added in one call is 50. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires one of the following OAuth scopes:

- `
  https://www.googleapis.com/auth/photoslibrary.appendonly`
- `
  https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata`