---
title: "Insert table rows"
method: POST
path: "/v1/tables/{tableId}/rows"
tags: ["Tables"]
---

# Insert table rows

`POST /v1/tables/{tableId}/rows`

## Request

- Base URL: `https://api.banksync.io`
- URL: `https://api.banksync.io/v1/tables/{tableId}/rows`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Write up to 500 rows in one batch, keyed by field key. Values are coerced against the field kinds and the WHOLE batch is rejected if any cell cannot be read as its field's kind, so a partial batch never lands. A computed, system, relation or attachment key in the body is refused with `FIELD_READ_ONLY` rather than ignored. Rows whose identity matches a deleted row are skipped, never resurrected.

## Path parameters

- `tableId` string, required: Table ID

## Request body

- object
  - `rows` object[], required
  - `mode` 'upsert' | 'append' | 'insert'
  - `anchor` object
    - `rowId` string, required
    - `placement` 'above' | 'below', required
  - `mergeOn` string[]
  - `onMany` 'fail' | 'first'
  - `typecast` boolean

## Response `201`

Batch written

- object
  - `success` true, required
  - `inserted` integer, required
  - `updated` integer, required
  - `skippedTombstoned` integer, required
  - `placement` 'positioned' | 'appended'
  - `insertedRowIds` string[], required
  - `updatedRowIds` string[], required

## Other responses

- `400`: Validation failed, or a read-only field was written — `code` names the refusal and `details[]` the offending field or cell
- `401`: Unauthorized
- `403`: Forbidden — missing scope, insufficient role, or plan limit reached
- `404`: Not found
- `409`: Conflict — the table is locked, the schema or row version moved, a cell the patch writes was changed by another edit (`ROW_CELL_CONFLICT`, with each cell’s current value in `details`), or a relation accepts one row. `code` says which.

---

[API](https://skmtc.dev/banksync/apis/banksync-api.md) · [All operations](https://skmtc.dev/banksync/apis/banksync-api/llms.txt) · [OpenAPI document](https://skmtc.dev/banksync/apis/banksync-api/revisions/94465f5ee922?raw)
