---
title: "PUT /v1/projects/{scriptId}/content"
method: PUT
path: "/v1/projects/{scriptId}/content"
tags: ["projects"]
---

# PUT /v1/projects/{scriptId}/content

`PUT /v1/projects/{scriptId}/content`

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.

## Path parameters

- `scriptId` string, required

## Request body

- Content — The Content resource.
  - `files` 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.
    - `updateTime` string, google-datetime — Last modified date timestamp.
    - `lastModifyUser` GoogleAppsScriptTypeUser — A simple user profile resource.
      - `name` string — The user's display name.
      - `email` string — The user's identifying email address.
      - `domain` string — The user's domain.
      - `photoUrl` string — The user's photo.
    - `functionSet` GoogleAppsScriptTypeFunctionSet — A set of functions. No duplicates are permitted.
      - `values` GoogleAppsScriptTypeFunction[] — A list of functions composing the set.
        - `parameters` string[] — The ordered list of parameter names of the function in the script project.
        - `name` string — The function name in the script project.
    - `name` string — The name of the file. The file extension is not part of the file name, which can be identified from the type field.
    - `type` 'ENUM_TYPE_UNSPECIFIED' | 'SERVER_JS' | 'HTML' | 'JSON' — The type of the file.
    - `source` string — The file content.
    - `createTime` string, google-datetime — Creation date timestamp.
  - `scriptId` string — The script project's Drive ID.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/script.md) · [All operations](https://skmtc.net/google/apis/script/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/script/versions/b83e197f53e2/schema)
