# Method: albums.addEnrichment

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

Adds an enrichment at a specified position in an app created created album.

### HTTP request

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

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

### Path parameters

| Parameters ||
|---|---|
| `albumId` | `string` Required. Identifier of the app created album where the enrichment is to be added. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "newEnrichmentItem": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#NewEnrichmentItem`) }, "albumPosition": { object (`https://developers.google.com/photos/library/reference/rest/v1/AlbumPosition`) } } ``` |

| Fields ||
|---|---|
| `newEnrichmentItem` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#NewEnrichmentItem`)`` Required. The enrichment to be added. |
| `albumPosition` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/AlbumPosition`)`` Required. The position in the app created album where the enrichment is to be inserted. |

### Response body

The enrichment item that's created.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "enrichmentItem": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#EnrichmentItem`) } } ``` |

| Fields ||
|---|---|
| `enrichmentItem` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#EnrichmentItem`)`` Output only. Enrichment which was added. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

## NewEnrichmentItem

A new enrichment item to be added to an app created album, used by the `albums.addEnrichment` call.

| JSON representation |
|---|
| ``` { // Union field `enrichment` can be only one of the following: "textEnrichment": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#TextEnrichment`) }, "locationEnrichment": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#LocationEnrichment`) }, "mapEnrichment": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#MapEnrichment`) } // End of list of possible types for union field `enrichment`. } ``` |

| Fields ||
|---|---|
| Union field `enrichment`. Enrichment to be added to the app created album. This could be either a text, location, or a map. `enrichment` can be only one of the following: ||
| `textEnrichment` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#TextEnrichment`)`` Text to be added to the app created album. |
| `locationEnrichment` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#LocationEnrichment`)`` Location to be added to the app created album. |
| `mapEnrichment` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#MapEnrichment`)`` Map to be added to the app created album. |

## TextEnrichment

An enrichment containing text.

| JSON representation |
|---|
| ``` { "text": string } ``` |

| Fields ||
|---|---|
| `text` | `string` Text for this enrichment item. |

## LocationEnrichment

An enrichment containing a single location.

| JSON representation |
|---|
| ``` { "location": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#Location`) } } ``` |

| Fields ||
|---|---|
| `location` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#Location`)`` Location for this enrichment item. |

## Location

Represents a physical location.

| JSON representation |
|---|
| ``` { "locationName": string, "latlng": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#LatLng`) } } ``` |

| Fields ||
|---|---|
| `locationName` | `string` Name of the location to be displayed. |
| `latlng` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#LatLng`)`` Position of the location on the map. |

## LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the [WGS84 standard](https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version). Values must be within normalized ranges.

| JSON representation |
|---|
| ``` { "latitude": number, "longitude": number } ``` |

| Fields ||
|---|---|
| `latitude` | `number` The latitude in degrees. It must be in the range \[-90.0, +90.0\]. |
| `longitude` | `number` The longitude in degrees. It must be in the range \[-180.0, +180.0\]. |

## MapEnrichment

An enrichment containing a map, showing origin and destination locations.

| JSON representation |
|---|
| ``` { "origin": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#Location`) }, "destination": { object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#Location`) } } ``` |

| Fields ||
|---|---|
| `origin` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#Location`)`` Origin location for this enrichment item. |
| `destination` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/albums/addEnrichment#Location`)`` Destination location for this enrichemt item. |

## EnrichmentItem

An enrichment item.

| JSON representation |
|---|
| ``` { "id": string } ``` |

| Fields ||
|---|---|
| `id` | `string` Identifier of the enrichment item. |