Skip to main content
POST
/
tables
/
{table_id}
/
rows
const result = await client.tables.createRows("tbl_abc123", {
  rows: [
    { name: "Widget A", price: 9.99, brand: "Acme" },
    { name: "Widget B", price: 14.99, brand: "Acme" },
  ],
});

console.log(result.inserted_count); // 2
for (const row of result.data) {
  console.log(row.id, row.data.name);
}
{
  "data": [
    {
      "id": "row_def456",
      "row_index": 5,
      "data": {
        "name": "Widget A",
        "price": 9.99,
        "brand": "Acme"
      },
      "created_at": "2025-03-10T14:30:00.000Z"
    },
    {
      "id": "row_ghi789",
      "row_index": 6,
      "data": {
        "name": "Widget B",
        "price": 14.99,
        "brand": "Acme"
      },
      "created_at": "2025-03-10T14:30:00.000Z"
    }
  ],
  "inserted_count": 2
}

Path parameters

table_id
string
required
The unique identifier of the table.

Request body

rows
object[]
required
Array of row objects to insert. Each object maps column keys to values. All keys must match columns defined in the table’s schema. Maximum 1000 rows per request.
Column keys are strictly validated against the table’s schema. If any row contains a key that doesn’t match a schema column, the entire request is rejected with a 422 error listing the unknown keys.

Response

data
array
inserted_count
integer
Number of rows successfully inserted.
const result = await client.tables.createRows("tbl_abc123", {
  rows: [
    { name: "Widget A", price: 9.99, brand: "Acme" },
    { name: "Widget B", price: 14.99, brand: "Acme" },
  ],
});

console.log(result.inserted_count); // 2
for (const row of result.data) {
  console.log(row.id, row.data.name);
}
{
  "data": [
    {
      "id": "row_def456",
      "row_index": 5,
      "data": {
        "name": "Widget A",
        "price": 9.99,
        "brand": "Acme"
      },
      "created_at": "2025-03-10T14:30:00.000Z"
    },
    {
      "id": "row_ghi789",
      "row_index": 6,
      "data": {
        "name": "Widget B",
        "price": 14.99,
        "brand": "Acme"
      },
      "created_at": "2025-03-10T14:30:00.000Z"
    }
  ],
  "inserted_count": 2
}