# Method: apprecovery.addTargeting

- [HTTP request](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#body.request_body)
  - [JSON representation](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#body.response_body)
- [Authorization scopes](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#body.aspect)
- [TargetingUpdate](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#TargetingUpdate)
  - [JSON representation](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#TargetingUpdate.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#try-it)

Incrementally update targeting for a recovery action. Note that only the criteria selected during the creation of recovery action can be expanded.

### HTTP request

`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting`

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

### Path parameters

| Parameters ||
|---|---|
| `packageName` | `string` Required. Package name of the app for which recovery action is to be updated. |
| `appRecoveryId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. ID corresponding to the app recovery action. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "targetingUpdate": { object (`https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#TargetingUpdate`) } } ``` |

| Fields ||
|---|---|
| `targetingUpdate` | ``object (`https://developers.google.com/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#TargetingUpdate`)`` Specifies targeting updates such as regions, android sdk versions etc. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires the following OAuth scope:

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

## TargetingUpdate

Update type for targeting. Note it is always a subset Targeting.

| JSON representation |
|---|
| ``` { // Union field `criteria` can be only one of the following: "regions": { object (`https://developers.google.com/android-publisher/api-ref/rest/v3/Regions`) }, "androidSdks": { object (`https://developers.google.com/android-publisher/api-ref/rest/v3/AndroidSdks`) }, "allUsers": { object (`https://developers.google.com/android-publisher/api-ref/rest/v3/AllUsers`) } // End of list of possible types for union field `criteria`. } ``` |

| Fields ||
|---|---|
| Union field `criteria`. Criteria for targeting in recovery action. Note that unless the criteria is not all_users, the criteria should always be the same as what was used during creation of app recovery action. Otherwise the update is rejected. In case criteria was previously set to target all_users, targeting update is impossible. In case the target group cannot be expanded as per the request, an error is thrown. `criteria` can be only one of the following: ||
| `regions` | ``object (`https://developers.google.com/android-publisher/api-ref/rest/v3/Regions`)`` Additional regions are targeted by the recovery action. |
| `androidSdks` | ``object (`https://developers.google.com/android-publisher/api-ref/rest/v3/AndroidSdks`)`` Additional android sdk levels are targeted by the recovery action. |
| `allUsers` | ``object (`https://developers.google.com/android-publisher/api-ref/rest/v3/AllUsers`)`` All users are targeted. |