Skip to main content

Adding Rows (POST)

Send a POST request to your sheet URL to append rows. The body can be a single JSON object (one row) or an array of objects (multiple rows). Keys must match your sheet's column headers.

Editor permission required

Writes go through Google Sheets, so the connection must have edit access:

  • For public sheets, set sharing to Anyone with the link → Editor.
  • For private sheets, use Connect with Drive.

Without edit access the API responds with write_error.

Add a single row

curl 'https://api.sheetbest.com/sheets/<api-id>' \
-H 'Content-Type: application/json' \
-d '{"Id": 10, "Name": "Jack Doe", "Age": 97}'

Add multiple rows

Pass an array to insert several rows in a single request:

curl 'https://api.sheetbest.com/sheets/<api-id>' \
-H 'Content-Type: application/json' \
-d '[
{"Id": 10, "Name": "Jack Doe", "Age": 97},
{"Id": 11, "Name": "John Doe", "Age": 44}
]'

Response

A successful insert returns the rows that were written:

{
"Id": "10",
"Name": "Jack Doe",
"Age": "97"
}

Keys not present in the sheet are ignored. Missing columns are written as empty cells.

Writing to a specific tab

Append /tabs/<TabName> to write to a tab other than the first one:

curl 'https://api.sheetbest.com/sheets/<api-id>/tabs/Admin' \
-H 'Content-Type: application/json' \
-d '[{"Name": "Jack Doe", "Age": 97}]'

See Working with Tabs.