Clear a range
Clears the values in a range and leaves its formatting.
Permission
The key must be granted sheets.values.write
A key without it gets 403 insufficient_scope, with the missing permission named in details.
Takes no body. Clears values and leaves formatting, so a template keeps its headers, colours and number formats. To clear formatting as well, use repeat_cell on the structural endpoint.
Path parameters
| Field | Type | Description |
|---|---|---|
id required |
string | The spreadsheet to clear in. |
range required |
A1 range | The range to empty. |
Request
curl https://api.veruapis.com/v1/spreadsheets/:id/values/:range/clear \
-X POST \
-H "Authorization: Bearer vak_live_..." \
-H "Idempotency-Key: $(uuidgen)"
Idempotency-Key is required on every write. Retrying with the same key returns the original response rather than repeating the operation, so a timeout is something you retry rather than something you investigate.
Response
| Field | Type | Description |
|---|---|---|
state |
string | The document's state after the write. Send it as If-Match on a structural change, or compare it with your last one to notice somebody else's edit. |
changed |
boolean | False when the write stored nothing new — writing a cell the value it already holds. Not an error and not worth retrying: no new state was produced and no collaborator was notified. |
{
"data": { "state": "c3d4e5f6a7b8c9d0", "changed": true },
"meta": { "request_id": "req_01j8z9...", "timestamp": "2026-09-02T10:00:00Z" }
}
Clears values and leaves formatting, so a template keeps its headers and number formats. Send no body.
Every failure uses the same shape, with a stable string code you can branch on. See the error reference.
Related
- POST Append rows
- POST Read several ranges
- POST Change a spreadsheet's structure
- POST Write several ranges
- GET List the sheets in a spreadsheet
- GET Get the current state
- GET Read a range
- PUT Write a range