Rows
Create rows
Add one or more rows with data to an existing table.
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);
}
result = client.tables.create_rows(
"tbl_abc123",
rows=[
{"name": "Widget A", "price": 9.99, "brand": "Acme"},
{"name": "Widget B", "price": 14.99, "brand": "Acme"},
],
)
print(result["inserted_count"]) # 2
for row in result["data"]:
print(row["id"], row["data"]["name"])
curl -X POST "https://hub.banditshq.com/api/v1/tables/tbl_abc123/rows" \
-H "Authorization: Bearer lasso_..." \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Widget A", "price": 9.99, "brand": "Acme" },
{ "name": "Widget B", "price": 14.99, "brand": "Acme" }
]
}'
{
"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
string
required
The unique identifier of the table.
Request body
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.
Show Row object
Show Row object
Each key-value pair corresponds to a column in the table’s schema. For example, if the schema has columns
name (text) and price (number), a valid row would be { "name": "Widget", "price": 9.99 }.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
array
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);
}
result = client.tables.create_rows(
"tbl_abc123",
rows=[
{"name": "Widget A", "price": 9.99, "brand": "Acme"},
{"name": "Widget B", "price": 14.99, "brand": "Acme"},
],
)
print(result["inserted_count"]) # 2
for row in result["data"]:
print(row["id"], row["data"]["name"])
curl -X POST "https://hub.banditshq.com/api/v1/tables/tbl_abc123/rows" \
-H "Authorization: Bearer lasso_..." \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Widget A", "price": 9.99, "brand": "Acme" },
{ "name": "Widget B", "price": 14.99, "brand": "Acme" }
]
}'
{
"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
}
⌘I
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);
}
result = client.tables.create_rows(
"tbl_abc123",
rows=[
{"name": "Widget A", "price": 9.99, "brand": "Acme"},
{"name": "Widget B", "price": 14.99, "brand": "Acme"},
],
)
print(result["inserted_count"]) # 2
for row in result["data"]:
print(row["id"], row["data"]["name"])
curl -X POST "https://hub.banditshq.com/api/v1/tables/tbl_abc123/rows" \
-H "Authorization: Bearer lasso_..." \
-H "Content-Type: application/json" \
-d '{
"rows": [
{ "name": "Widget A", "price": 9.99, "brand": "Acme" },
{ "name": "Widget B", "price": 14.99, "brand": "Acme" }
]
}'
{
"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
}

