---
title: "POST /v1/customers/{customersId}/policies/files:uploadPolicyFile"
method: POST
path: "/v1/customers/{customersId}/policies/files:uploadPolicyFile"
tags: ["media"]
---

# POST /v1/customers/{customersId}/policies/files:uploadPolicyFile

`POST /v1/customers/{customersId}/policies/files:uploadPolicyFile`

## Request

- Base URL: `https://chromepolicy.googleapis.com`
- URL: `https://chromepolicy.googleapis.com/v1/customers/{customersId}/policies/files:uploadPolicyFile`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/chrome.management.policy`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chrome.management.policy`
- TypeScript: <https://skmtc.dev/google/apis/chromepolicy/docs/v1/customers/:customersId/policies/files:uploadPolicyFile/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an enterprise file from the content provided by user. Returns a public download url for end user.

## Path parameters

- `customersId` string, required

## Request body

- GoogleChromePolicyVersionsV1UploadPolicyFileRequest: Request message for uploading a file for a policy.
  - `policyField` string: Required. The fully qualified policy schema and field name this file is uploaded for. This information will be used to validate the content type of the file.

## Response `200`

Successful response

- GoogleChromePolicyVersionsV1UploadPolicyFileResponse: Response message for downloading an uploaded file.
  - `downloadUri` string: The uri for end user to download the file.

---

[API](https://skmtc.dev/google/apis/chromepolicy.md) - [All operations](https://skmtc.dev/google/apis/chromepolicy/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/chromepolicy/revisions/c9f2e6e8732d?raw)
