Insert

POST/v1/data/:id/:sheet?

This endpoint allows you to insert data into a specific sheet in your spreadsheet. You need to provide an array of objects where each object represents a row to be added to the sheet.

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.

data
array<object>Required
Example:
[
  {
    "name": "John",
    "age": 21,
    "dob": "1998/11/04"
  }
]
An array of row objects to be inserted into the selected sheet.

Request Example

curl -X POST https://api.sheet2db.dev/v1/data/aace0271-c068-499f-bb40-83354a35eebc/contacts \
-H "Content-Type: application/json" \
-d '{
  "data": [
    {
      "name": "John",
      "age": 21,
      "dob": "1998/11/04"
    }
  ]
}'

Successful Response Example

{
  "inserted": 1
}