Create


POST/api/v1/{API_ID}

Create

Creates row(s) in the spreadsheet. Your request should contain a data attribute - it should be an array of rows. The keys inside the object should be the column names, and the values will be filled in the spreadsheet. The rows will be added at the end of the sheet.

You can use INCREMENT value. SheetDB will look for the biggest number in the given column and increase by 1.

You can use the TIMESTAMP value to use the current timestamp (in unix time).

You can use the DATETIME value to use the current date
Format: 2016-06-23 09:07:21.

If for some reason you can't put your data in the data attribute, SheetDB will try to use the entire request data to match the spreadsheet columns.

API will return the number of created rows with status code 201 Created.

Required attributes

  • Name
    data
    Type
    json
    Description

    An array with the rows you want to append.
    Example: [{'id': 4,'name': "Mark"},{'id': 5,'name': "Susan"}]

Optional attributes

  • Name
    sheet
    Type
    string
    Description

    The sheet (tab) you want to select.

  • Name
    return_values
    Type
    boolean
    Description

    If this attribute has a value of true in the response you will receive freshly created rows.

  • Name
    mode
    Type
    string
    Description

    Value Input Option, more info here.

Request

POST
/api/v1/{API_ID}
curl -X POST -G https://sheetdb.io/api/v1/58f61be4dda40 \
  -d id='INCREMENT' \
  -d name=Mark \
  -d age=18

JSON Response

{
    created: 1
}