# Method: projects.versions.create

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

Creates a new immutable version using the current code, with a unique version number.

### HTTP request

`POST https://script.googleapis.com/v1/projects/{scriptId}/versions`

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 |
|---|
| ``` { "versionNumber": integer, "description": string, "createTime": string } ``` |

| Fields ||
|---|---|
| `versionNumber` | `integer` The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created. |
| `description` | `string` The description for this version. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` When the version was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |

### Response body

If successful, the response body contains a newly created instance of `https://developers.google.com/apps-script/api/reference/rest/v1/projects.versions#Version`.

### 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).