Method: projects.create

  • This page details how to create a new, empty script project using the Apps Script API.

  • The creation is done via an HTTP POST request tohttps://script.googleapis.com/v1/projects.

  • The request body can include atitle for the project and an optionalparentId to bind the script to a specific Google Drive file.

  • A successful response will return a newly createdProject instance.

  • This operation requires thehttps://www.googleapis.com/auth/script.projects authorization scope.

Creates a new, empty script project with no script files and a base manifest file.

HTTP request

POST https://script.googleapis.com/v1/projects

The URL usesgRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{"title":string,"parentId":string}
Fields
title

string

The title for the project.

parentId

string

The Drive ID of a parent file that the created script project is bound to. This is usually the ID of a Google Doc, Google Sheet, Google Form, or Google Slides file. If not set, a standalone script project is created.

Response body

If successful, the response body contains a newly created instance ofProject.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/script.projects

For more information, see theOAuth 2.0 Overview.

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 2024-10-31 UTC.