Skip to main content
POST
/
v1
/
table
/
{table_uuid}
/
rows
/
upsert
Update or create rows by key
curl --request POST \
  --url https://api.databar.ai/v1/table/{table_uuid}/rows/upsert \
  --header 'Content-Type: application/json' \
  --header 'x-apikey: <x-apikey>' \
  --data '
{
  "return_rows": false,
  "rows": [
    {
      "fields": {
        "company_name": "Acme",
        "first_name": "Ivan"
      },
      "key": {
        "email": "ivan@example.com"
      }
    },
    {
      "fields": {
        "first_name": "New Person",
        "title": "Engineer"
      },
      "key": {
        "email": "new@example.com"
      }
    }
  ]
}
'
{
  "results": [
    {
      "action": "updated",
      "id": "91f0e833-5dfc-4f63-be96-e3a28925190f"
    },
    {
      "action": "created",
      "id": "a1b2c3d4-0000-0000-0000-000000000000",
      "index": 1
    }
  ]
}

Headers

x-apikey
string
required

API Key for authentication

Path Parameters

table_uuid
string<uuid>
required

The UUID of the table

Body

application/json
rows
UpsertRow · object[]
required

List of rows to upsert (max 50).

Required array length: 1 - 50 elements
return_rows
boolean
default:false

If true, each result includes full row_data.

Response

Successful Response

results
UpsertResultItem · object[]
required