POST

Add Rows

Insert new rows into your spreadsheet by sending JSON data to your API endpoint.

Basic Usage

To write data, send a POST request with JSON data to your Sheet API endpoint. This will insert a new row in your sheet with the information you've sent.

Add Single RowcURL
# Add one row to the sheet
curl 'https://api.sheetapi.com/sheets/your-sheet-id' \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: your-api-key' \
  -d '{
    "Id": "10",
    "Name": "Jack Doe", 
    "Age": "97",
    "Email": "jack@example.com",
    "Created at": "2024-08-16T13:32:11.744Z"
  }'
Add Multiple RowscURL
# Add multiple rows to the sheet
curl 'https://api.sheetapi.com/sheets/your-sheet-id' \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: your-api-key' \
  -d '[
    {
      "Id": "10",
      "Name": "Jack Doe",
      "Age": "97", 
      "Email": "jack@example.com",
      "Created at": "2024-08-16T13:32:11.744Z"
    },
    {
      "Id": "11",
      "Name": "John Smith",
      "Age": "44", 
      "Email": "john.smith@example.com", 
      "Created at": "2024-08-16T13:32:11.744Z"
    }
  ]'

Response Examples

Success Response
When rows are successfully added
{
  "success": true,
  "message": "Rows added successfully",
  "rows_added": 1,
  "data": [
    {
      "Id": "10",
      "Name": "Jack Doe",
      "Age": "97",
      "Email": "jack@example.com",
      "Created at": "2024-08-16T13:32:11.744Z"
    }
  ]
}
Error Response
When there's an issue with the request
{
  "success": false,
  "error": "validation_error",
  "message": "Missing required field: Name",
  "details": {
    "missing_fields": ["Name"],
    "provided_fields": ["Id", "Age"]
  }
}

Best Practices

✓ Do

• Match column names exactly as they appear in your sheet

• Use consistent data types for each column

• Include all required fields in your requests

• Batch multiple rows in a single request when possible

• Handle errors gracefully in your application

✗ Don't

• Send requests without proper authentication

• Include extra fields not in your sheet headers

• Send extremely large payloads (>1MB)

• Ignore validation errors

• Make excessive concurrent requests

Rate Limits

POST requests are subject to rate limiting to ensure service stability:

PlanRequests/MinuteRows/RequestMonthly Limit
Free101001,000
Pro1001,000100,000
Enterprise1,00010,000Unlimited