---
title: Bulk create/update/delete rows
url: https://anyrow.ai/docs/api/rows/bulk
canonical_url: https://anyrow.ai/docs/api/rows/bulk
---

# Bulk create/update/delete rows

`POST /v1/projects/{project_id}/tables/{table_id}/rows/bulk`

Authentication: `Authorization: ApiKey {your_api_key}`.

## Path parameters

- `project_id` (string, required)
- `table_id` (string, required)

## Request body

Content type: `application/json` (required).

- `creates` (array of objects, optional): Up to 1000 items.
- `deletes` (array of strings, optional): Up to 1000 items.
- `updates` (array of objects, optional): Up to 1000 items.
  - `data` (object, required)
  - `id` (string, required)

## Returns

200 `application/json`.

- `created` (array of objects, optional)
- `deleted` (array of strings, optional)
- `updated` (array of objects, optional)

## Errors

- 404: `not_found`, `table_not_found`

Errors every endpoint can return: [Errors](https://anyrow.ai/docs/api/errors.md).

## Request

```ts title="Node.js"
import { AnyrowSDK } from "@anyrow/sdk"

const anyrow = new AnyrowSDK({
  baseURL: "https://api.anyrow.ai",
  headers: { Authorization: `ApiKey ${process.env.ANYROW_API_KEY}` },
})

const { data, error } = await anyrow.row.bulk({
  params: {
    project_id: "{project_id}",
    table_id: "{table_id}"
  },
  json: {
    creates: [
      {}
    ],
    deletes: [
      "string"
    ],
    updates: [
      {
        data: {},
        id: "string"
      }
    ]
  },
})
```

```bash title="cURL"
curl -X POST 'https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk' \
  -H 'Authorization: ApiKey {your_api_key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "creates": [
    {}
  ],
  "deletes": [
    "string"
  ],
  "updates": [
    {
      "data": {},
      "id": "string"
    }
  ]
}'
```

```js title="JavaScript"
const response = await fetch("https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk", {
  method: "POST",
  headers: {
    Authorization: "ApiKey {your_api_key}",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "creates": [
      {}
    ],
    "deletes": [
      "string"
    ],
    "updates": [
      {
        "data": {},
        "id": "string"
      }
    ]
  }),
})
const data = await response.json()
```

```python title="Python"
import requests

response = requests.post(
    "https://api.anyrow.ai/v1/projects/{project_id}/tables/{table_id}/rows/bulk",
    headers={
        "Authorization": "ApiKey {your_api_key}",
    },
    json={
        "creates": [
            {},
        ],
        "deletes": [
            "string",
        ],
        "updates": [
            {
                "data": {},
                "id": "string",
            },
        ],
    },
)
print(response.json())
```

## Response

```json title="200"
{
  "created": [
    {}
  ],
  "deleted": [
    "string"
  ],
  "updated": [
    {}
  ]
}
```
