---
title: "Upsert rows"
method: POST
path: "/external/v1/table/{table_uuid}/rows/upsert"
tags: ["Table"]
---

# Upsert rows

`POST /external/v1/table/{table_uuid}/rows/upsert`

## Request

- Base URL: `https://api.databar.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.databar.ai/external/v1/table/{table_uuid}/rows/upsert`
- Auth: API key in header `x-apikey`

## Path parameters

- `table_uuid` string, uuid, required

## Request body

- UpsertIn
  - `rows` UpsertRowIn[], required
    - `key` object, required: Exactly one column to match on: {column_name: value}.
    - `fields` object, required: Column values to set/update.
  - `return_rows` boolean

## Response `200`

OK

- UpsertOut
  - `results` UpsertResult[], required
    - `index` integer, nullable
    - `id` string, nullable
    - `action` string, nullable
    - `error` object, nullable
    - `row_data` object, nullable

---

[API](https://skmtc.dev/databar/apis/external-api.md) - [All operations](https://skmtc.dev/databar/apis/external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/databar/apis/external-api/revisions/efe15f8bb9bb?raw)
