Skip to content
gist.link ↗

writeRange

Mutation Sheets API — POST https://sheets.api.gist.link/graphql

The writeRange mutation on the Sheets API.

sheets:mutation:writeRange

The calling IAM key must hold this permission (or a wildcard that covers it: sheets:mutation:* or sheets:*) and the access token must have been minted with audience=sheets. See Permissions.

type Mutation {
writeRange(input: WriteRangeInput!): GridMutationPayload!
}
Argument Type Required Description
input WriteRangeInput! Yes —

GridMutationPayload! — see the Sheets types reference.

Terminal window
curl https://sheets.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation WriteRange($input: WriteRangeInput!) { writeRange(input: $input) { success workbookId worksheetId revision idempotentReplay startRow startColumn endRow } }",
"variables": {
"input": {
"worksheetId": "example",
"startRow": 10,
"startColumn": 10,
"rows": [
{
"value": {},
"formula": "example",
"style": {}
}
],
"clientInstanceId": "example",
"clientMutationId": "example"
}
}
}
JSON