# Method: edits.commit

- [HTTP request](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#body.request_body)
- [Response body](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#body.response_body)
- [ChangesInReviewBehaviorType](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#ChangesInReviewBehaviorType)
- [Changes in review error message sample](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#changes_in_review_error_message_sample)
- [Authorization scopes](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#body.aspect)
- [Try it!](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#try-it)

Commits an app edit.

### HTTP request

`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/edits/{editId}:commit`

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

### Path parameters

| Parameters ||
|---|---|
| `packageName` | `string` Package name of the app. |
| `editId` | `string` Identifier of the edit. |

### Query parameters

| Parameters ||
|---|---|
| `changesNotSentForReview` | `boolean` When a rejection happens, the parameter will make sure that the changes in this edit won't be reviewed until they are explicitly sent for review from within the Google Play Console UI. These changes will be added to any other changes that are not yet sent for review. |
| `changesInReviewBehavior` | ``enum (`https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#ChangesInReviewBehaviorType`)`` Optional. Specify how the API should behave if there are changes currently in review. If this value is not set, it will default to "CANCEL_IN_REVIEW_AND_SUBMIT", which will cancel the changes in review and then send all the changes for publishing. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/android-publisher/api-ref/rest/v3/edits#AppEdit`.

## ChangesInReviewBehaviorType

Defines the behavior of committing a new edit while changes are already in review.

| Enums ||
|---|---|
| `CHANGES_IN_REVIEW_BEHAVIOR_TYPE_UNSPECIFIED` | Defaults to CANCEL_IN_REVIEW_AND_SUBMIT. |
| `CANCEL_IN_REVIEW_AND_SUBMIT` | If there are changes already in review, then this will cancel that review first and then send all the changes for publishing. |
| `ERROR_IF_IN_REVIEW` | If there are changes in review, then this will return an error. Please refer to the [error message sample](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#changes_in_review_error_message_sample) that is returned when this happens. Note that this won't invalidate the edit. If there aren't any changes in review, then this will continue and send the new changes for publishing. |

### Changes in review error message sample

If a request is sent with the query parameter `changesInReviewBehavior` set to `ERROR_IF_IN_REVIEW` and your app already has changes in review, a 400 HTTP Response is returned with the following details:

```
{
  "error": {
    "code": 400,
    "message": "You already have changes in review. Cancel this review or wait for it to complete before you try again. See https://developers.google.com/android-publisher/api-ref/rest/v3/applications.tracks.releases",
    "status": "FAILED_PRECONDITION",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "CHANGES_ALREADY_IN_REVIEW",
        "domain": "googleapis.com",
        "metadata": {
          "editId": "123456790",
          "method": "edits.commit",
          "service": "androidpublisher.googleapis.com"
        }
      }
    ]
  }
}
```

### Authorization scopes

Requires the following OAuth scope:

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