Asynchronously write data to a region#

Deprecated

This endpoint is deprecated and may be removed in a future release.

This endpoint was deprecated on 2026-02-12.

It is scheduled for sunset on 2029-01-31.

Description#

Overwrites all data in a region with new data. If the provided range data is smaller than the specified region, all cells in the region and not covered by the range data will be cleared. The provided range data must not be larger than the specified region. An empty range data is valid and may be used to clear a region.

PUT /spreadsheets/v1/async/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region}

Required OAuth Scopes

data_tables|w

Parameters#

Parameter

In

Type

Required

Description

X-Version

header

string

false

Version of the API (2022-01-01)

spreadsheetId

path

string

true

The unique identifier of the spreadsheet

sheetId

path

string

true

The unique identifier of the sheet

region

path

string

true

A1 style representation of a cell or range. A range may be unbounded in any/all directions by leaving off the corresponding column or row. Unbounded ranges will be clamped to the data in the queried region.

body

body

RangeDataBody

true

Multidimensional array of cell values in row-major order. The null JSON value may be used to avoid modifying a cell.

Detailed descriptions#

region: A1 style representation of a cell or range. A range may be unbounded in any/all directions by leaving off the corresponding column or row. Unbounded ranges will be clamped to the data in the queried region.

Cell Syntax: [Column][Row]

Range Syntax: [Start Column][Start Row]:[Stop Column][Stop Row]

Examples:

  • The region A1 selects data in the cell A1

  • The region A2:D8 selects all data in the range between A2 and D8 (inclusive)

  • The region A:A selects all data in column A

  • The region 1:3 selects all data in rows 1 through 3

  • The region B3: selects all data below and to the right of B3 (inclusive)

  • The region : selects all data in the sheet

Be sure to URL encode the region to avoid misinterpretation of the :.

Body parameter example#

{
  "values": [
    [
      "Row1-Column1 Data",
      "Row1-Column2 Data"
    ],
    [
      "Row2-Column1 Data",
      "Row2-Column2 Data"
    ]
  ]
}

Code Samples#

curl -X PUT https://api.app.wdesk.com/spreadsheets/v1/async/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region} \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer {access-token}' \
    -H 'X-Version: 2022-01-01'
http PUT https://api.app.wdesk.com/spreadsheets/v1/async/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region} \
    X-Version:2022-01-01 \
    Content-Type:application/json \
    Accept:application/json \
    Authorization:"Bearer {access-token}"
wget --method=PUT "https://api.app.wdesk.com/spreadsheets/v1/async/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region}" \
    --output-document -  \ 
    --header 'Content-Type: application/json' \ 
    --header 'Accept: application/json' \ 
    --header 'Authorization: Bearer {access-token}' \
    --header 'X-Version: 2022-01-01'
import requests

headers = {
  'X-Version': '2022-01-01',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.app.wdesk.com/spreadsheets/v1/async/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region}', headers = headers)

print(r.headers['Location'])

Returns#

202 - Accepted#

Returns a JSON object with data and next_url properties. data contains an id property providing a unique identifier for the job. next_url contains a fully qualified URL, including required query parameters, to query for the job status. If there is no next page to query for, this will be empty.

400 - Bad Request#

An ErrorResponse object containing a message and list of errors.

401 - Unauthorized#

An ErrorResponse object containing a message and list of errors.

403 - Forbidden#

An ErrorResponse object containing a message and list of errors.

404 - Not Found#

An ErrorResponse object containing a message and list of errors.

422 - Unprocessable Entity#

An ErrorResponse object containing a message and list of errors.

500 - Internal Server Error#

An ErrorResponse object containing a message and list of errors.

Example Responses#

{
  "data": {
    "id": "bd9iOjhlYmViZDY2YjdkYzQzMHU5NmU5MWQ4YzRjMTNiOWYwOjI"
  },
  "next_url": "https://api.app.wdesk.com/spreadsheets/v1/queue-jobs/bd9iOjhlYmViZDY2YjdkYzQzMHU5NmU5MWQ4YzRjMTNiOWYwOjI",
  "request_id": "d6a6ce3f-f120-4104-9587-a5a2dc45626c"
}