# Method: projects.updateContent

- [HTTP request](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#body.request_body)
  - [JSON representation](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#body.response_body)
- [Authorization Scopes](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#body.aspect)
- [Try it!](https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent#try-it)

Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.

### HTTP request

`PUT https://script.googleapis.com/v1/projects/{scriptId}/content`

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

### Path parameters

| Parameters ||
|---|---|
| `scriptId` | `string` The script project's Drive ID. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "files": [ { object (`https://developers.google.com/apps-script/api/reference/rest/v1/File`) } ] } ``` |

| Fields ||
|---|---|
| `files[]` | ``object (`https://developers.google.com/apps-script/api/reference/rest/v1/File`)`` The list of script project files. One of the files is a script manifest; it must be named "appsscript", must have type of JSON, and include the manifest configurations for the project. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/apps-script/api/reference/rest/v1/projects/getContent#body.Content`.

### Authorization Scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/script.projects`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).