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

Upload a policy declaration file for the hosted app. Returns an ID to track the file.

### HTTP request

- Upload URI, for media upload requests:  
  `POST https://androidpublisher.googleapis.com/upload/androidpublisher/v3/appstore/{appStorePackageName}/apps/{packageName}/policyDeclarationFiles:upload`
- Metadata URI, for metadata-only requests:  
  `POST https://androidpublisher.googleapis.com/androidpublisher/v3/appstore/{appStorePackageName}/apps/{packageName}/policyDeclarationFiles:upload`

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

### Path parameters

| Parameters ||
|---|---|
| `appStorePackageName` | `string` Required. Package name of the third-party app store. |
| `packageName` | `string` Required. Package name of the app. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "fileType": enum (`https://developers.google.com/android-publisher/api-ref/rest/v3/appstoreappsreview/uploadappstoreapppolicydeclarationfile#DeclarationFileType`) } ``` |

| Fields ||
|---|---|
| `fileType` | ``enum (`https://developers.google.com/android-publisher/api-ref/rest/v3/appstoreappsreview/uploadappstoreapppolicydeclarationfile#DeclarationFileType`)`` Required. Type of the policy declaration file. |

### Response body

Response for uploading a policy declaration file.

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

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

| Fields ||
|---|---|
| `fileId` | `string` The unique ID of the uploaded file. |

### Authorization scopes

Requires the following OAuth scope:

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

## DeclarationFileType

Type of policy declaration file.

| Enums ||
|---|---|
| `DECLARATION_FILE_TYPE_UNSPECIFIED` | Unspecified file type. |
| `DECLARATION_FILE_TYPE_DOCUMENT` | File type for PDF, JPEG, and PNG documents. |