Skip to main content
POST
/
tables
/
{tableId}
/
rows
/
upsert
Upsert rows on matchColumns (the single v2 batch write primitive)
curl --request POST \
  --url https://origami.chat/api/v2/tables/{tableId}/rows/upsert \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "rows": [
    {}
  ],
  "matchColumns": [
    "<string>"
  ],
  "enrich": true,
  "reenrichUpdated": false,
  "batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "object": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "counts": {
    "inserted": 123,
    "updated": 123,
    "skipped": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Transport-level replay protection — any v2 POST may send it (1–255 printable ASCII characters; UUIDs recommended). The first response for a key is recorded and replayed verbatim for retries with the same key + method/path/body for 24 hours; replayed responses carry the Idempotency-Replay: true response header. Reusing a key with a different request — or retrying while the original is still in flight — returns 409 IDEMPOTENCY_ERROR. 5xx responses are never recorded (the retry re-executes).

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]{1,255}$

Path Parameters

tableId
string<uuid>
required

Body

application/json
rows
object[]
required
Required array length: 1 - 100 elements
matchColumns
string[]
required
Minimum array length: 1
enrich
boolean
default:true
reenrichUpdated
boolean
default:false
batchId
string<uuid>

Response

Idempotent replay of an existing batchId (same receipt shape).

Response of POST /tables/{tableId}/rows/upsert and .../rows/upsert-file — an enrichment_run reference the caller polls via GET /enrichment-runs/{runId}.

object
string
required
Allowed value: "enrichment_run"
id
string<uuid>
required
batchId
string<uuid>
required

Legacy alias of id.

counts
object
required