Method: projects.create Stay organized with collections Save and categorize content based on your preferences.
Page Summary
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 to
https://script.googleapis.com/v1/projects.The request body can include a
titlefor the project and an optionalparentIdto bind the script to a specific Google Drive file.A successful response will return a newly created
Projectinstance.This operation requires the
https://www.googleapis.com/auth/script.projectsauthorization 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 |
The title for the project. |
parentId |
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.