Delete

DELETE/v1/data/:id/sheet?

This endpoint allows you to delete rows from a specific sheet in your spreadsheet. You can delete by row index or apply a filter to delete matching rows.

To delete by row index, provide the row number. To delete using a filter, specify a filter expression that matches the rows you want to delete.

id
stringRequired
Example: aace0271-c068-499f-bb40-83354a35eebc
The unique identifier for the API
sheet
stringOptional
Example: Transactions
The name of the sheet (tab) within the spreadsheet to operate on.

type
enum['row' | 'filter']Required
Example: filter
Specifies the type of update. Use 'row' to update by row index or 'filter' to update rows matching a filter condition.
filter
stringRequired If type=filter
Example: age:name:John

A filter expression to select rows to delete when type is set to 'filter'. For example, 'age:eq:21' to delete rows where age is 21.

Learn More
row
integerRequired If type=row
Example: 5
The index (1-based excluding header row) of the row to update when type is set to 'row'. For example, '5' would refer to the 5th row in the dataset.

Request Example

curl -X DELETE "https://api.sheet2db.dev/v1/data/aace0271-c068-499f-bb40-83354a35eebc/contacts" \
-G \
-d "type=row" \
-d "row=5"

Successful Response Example

{
  "deleted": 1
}