# Method: edits.expansionfiles.upload

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

Uploads a new expansion file and attaches to the specified APK.

### HTTP request

- Upload URI, for media upload requests:  
  `POST https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}`
- Metadata URI, for metadata-only requests:  
  `POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}`

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. |
| `apkVersionCode` | `integer` The version code of the APK whose expansion file configuration is being read or modified. |
| `expansionFileType` | ``enum (`https://developers.google.com/android-publisher/api-ref/rest/v3/ExpansionFileType`)`` The file type of the expansion file configuration which is being updated. |

### Request body

The request body contains an instance of `ExpansionFilesUploadRequestBody`.

### Response body

Response for uploading an expansion file.

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

| JSON representation |
|---|
| ``` { "expansionFile": { object (`https://developers.google.com/android-publisher/api-ref/rest/v3/edits.expansionfiles#ExpansionFile`) } } ``` |

| Fields ||
|---|---|
| `expansionFile` | ``object (`https://developers.google.com/android-publisher/api-ref/rest/v3/edits.expansionfiles#ExpansionFile`)`` The uploaded expansion file configuration. |

### Authorization scopes

Requires the following OAuth scope:

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