# Update version information

Updates the app version review status.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/application/v6/applications/:app_id/app_versions/:version_id
HTTP Method | PATCH
Rate Limit | [Special Rate Limit](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Update app version information(application:application.app_version)
Required field scopes | **Notice**：The response body of the API contains the following sensitive fields, and they will be returned only after corresponding scopes are added. If you do not need the fields, it is not recommended that you request the scopes.<br>Obtain user ID(contact:user.employee_id:readonly)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Path parameters

Parameter | Type | Description
---|---|---
app_id | string | App ID<br>**Example value**: "cli_9f3ca975326b501b"
version_id | string | ID that uniquely identifies the app version<br>**Example value**: "oav_d317f090b7258ad0372aa53963cda70d"

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
user_id_type | string | Yes | User ID categories<br>**Example value**: open_id<br>**Optional values are**:<br>- open_id：Identifies a user to an app. The same user has different Open IDs in different apps. [How to get Open ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-openid)<br>- union_id：Identifies a user to a tenant that acts as a developer. A user has the same Union ID in apps developed by the same developer, and has different Union IDs in apps developed by different developers. A developer can use Union ID to link the same user's identities in multiple apps.[How to get Union ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-union-id)<br>- user_id：Identifies a user to a tenant. The same user has different User IDs in different tenants. In one single tenant, a user has the same User ID in all apps （including store apps）. User ID is usually used to communicate user data between different apps. [How to get User ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-user-id)<br>**Default value**: `open_id`<br>**When the value is `user_id`, the following field scopes are required**:<br>Obtain user ID(contact:user.employee_id:readonly)
operator_id | string | Yes | Operator's open_id<br>**Example value**: ou_4065981088f8ef67a504ba8bd6b24d85
reject_reason | string | No | This field is required when you want to change the version status to "Rejected".<br>**Example value**: Reason for rejection

### Request body

Parameter | Type | Required | Description
---|---|---|---
status | int | No | Version status<br>**Example value**: 1<br>**Optional values are**:<br>- 0：Unknown status<br>- 1：Approved<br>- 2：Rejected<br>- 3：In review<br>- 4：Not submitted for review

### Request body example
```json
{
    "status": 1
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {}
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 210503 | invalid app_id | Check whether the app_id in the request path is valid.
400 | 210504 | no such app in tenant | Check whether the queried app and the app used to call the API are in the same company.
400 | 210505 | target app not a custom app | Check whether the queried app is a custom app.
400 | 210506 | no such app | Check whether the app_id in the request path exists.
400 | 210507 | no such user_id | Check whether the specified user ID exists.
400 | 211002 | no such version_id | Check whether the version_id in the path exists.
400 | 211003 | no such version of desired app | Check whether the version_id matches the app specified by the app_id.
400 | 211004 | no authority for quota limit | Check whether it is a Business/Enterprise tenant.
400 | 211005 | invalid app id | Check the app ID.
400 | 211006 | invalid department id | Check the department ID.

