Managing Versions

  • This section describes Apps Script API methods for managing script project versions.

  • You can use methods to create, list, and read project code versions.

  • API methods returnVersion objects containing configuration details like version number and description.

  • To read the code of a specific version, use aprojects.getContent request.

This section provides an overview of the Apps Script API methods you can useto create a new project codeversion, readversion information, or list all existing versions.

Note: These methods return one or moreVersionobjects which contain the version configuration information such as theversion number and description. You can read the code attached to a specificversion using aprojects.getContentrequest.
API method overview
Create a version

projects.versions.create

Results: Create a new, immutable version of a script project's code. The project's current saved code is used for the version. This creates a code "snapshot" you can read later or use in a specificdeployment. Returns aVersion object, containing the version configuration details.

List a project's versions

projects.versions.list

Results: Returns an array ofVersion objects, each representing one of the versions of the script project.

Read a version

projects.versions.get

Results: Returns aVersion that represents a specific version of a script project.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.