API Reference

Create a new sheet in a spreadsheet

Description

Creates a new sheet in a spreadsheet, given its properties. If the sheet name provided isn't unique, a number is appended to make it unique. By default, creates a top-level sheet in the top-most position.

POST /spreadsheets/{spreadsheetId}/sheets

🚧

Required OAuth Scopes:

file:write

Parameters

ParameterInTypeRequiredDescription
spreadsheetIdpathstringtrueThe unique identifier of the spreadsheet
bodybodySheettrueThe properties of the sheet to create

Body parameter example

{
  "index": 2,
  "name": "Q3"
}

Code Samples

curl -X POST https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http POST https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets', headers = headers)

print(r.json())

Returns

201 - Created

Returns a Sheet object containing details about the newly created Sheet.

Example Responses


{
  "id": "281c26d8ca0145c2cabe1714dc318c26",
  "name": "Q3",
  "parent": null,
  "index": 2,
  "children": [],
  "dataset": null
}