Upsert rows on matchColumns (the single v2 batch write primitive)
v2’s one row-write endpoint; there is no bare per-row insert (an
insert-only call is just an upsert whose rows match nothing). All writes
go through api_batches and are idempotent per batchId.
Rows matching an existing row on everymatchColumns value update
that row’s input cells; non-matching rows insert. Per-row
inserted/updated/skipped outcomes are recorded on the batch.
Row keys and matchColumns are input column slugs (from
GET /tables/{tableId}/columns → columns[].slug), never display
names. A non-slug row key → UNKNOWN_FIELDS.
matchColumns (required) must be real input columns (UNKNOWN_COLUMN)
and every match value must be present + non-empty on every row
(MISSING_MATCH_VALUE).
Duplicate request keys → DUPLICATE_MATCH_KEY; multiple existing rows
match one key → AMBIGUOUS_MATCH (409).
reenrichUpdated (default false): set true to also re-run enrichment
on rows the upsert updated (re-spends credits); off by default so an
upsert never silently re-enriches matched rows.
Only input-kind columns are writable. Enrichment, score, and
sequence columns are populated automatically; sequences are
agent/column-generated only (see POST /tables/{tableId}/campaigns),
never set via this endpoint; passing one returns NON_INPUT_COLUMNS.
The response references the tracking object by id: it is an
enrichment_run the caller polls via GET /enrichment-runs/{runId}.
POST
/
tables
/
{tableId}
/
rows
/
upsert
Upsert rows on matchColumns (the single v2 batch write primitive)
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).
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}.
Linked table-run parent (enrich=true batches only). Lets consumers
poll GET /tables/{tableId}/runs/{runId} or await the
table.run.completed webhook without a version bump.
null for enrich=false writes and pre-migration batches.
Completion is first-owner scoped: overlapping cells already active
under an earlier run are not adopted into this parent, so this run
can complete while those cells are still executing elsewhere.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Origami API","colors":{"primary":"#fe7bcd","light":"#f865b0","dark":"#db2777"},"logo":{"light":"https://mintcdn.com/origamiagents/XHcb8BJCoB-coV4A/logo/light.svg?fit=max\u0026auto=format\u0026n=XHcb8BJCoB-coV4A\u0026q=85\u0026s=f373c14798a59bfb8cedc4284f55a0ca","dark":"https://mintcdn.com/origamiagents/XHcb8BJCoB-coV4A/logo/dark.svg?fit=max\u0026auto=format\u0026n=XHcb8BJCoB-coV4A\u0026q=85\u0026s=093cb5c8097b2da659e228d2550eea17"},"favicon":"https://mintcdn.com/origamiagents/mxZjiz8CSMmrStmV/favicon.svg?fit=max\u0026auto=format\u0026n=mxZjiz8CSMmrStmV\u0026q=85\u0026s=7cc57639b284f223ef20a2e7c68310c9","appearance":{"default":"light","strict":false},"navbar":{"links":[{"href":"mailto:hello@origamiagents.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://origami.chat"}},"footer":{},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"origamiagents","hasAudioNarration":false,"actualSubdomain":"origamiagents","customDomains":["docs.origami.chat"],"gitSource":{"type":"github","owner":"origami-agents","repo":"mintlify-docs","deployBranch":"main","isPrivate":false,"contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a95e4f4a93e41658f2495e7","collectionId":"f921f926-53b2-4f04-9679-77c54a1d2ae7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a95e4f4a93e41658f2495e7"},"entitlements":{},"buildId":"6a95e4f4a93e41658f2495e7","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"v3 API","count":129},{"language":"default","tag":"v2 API","count":79},{"language":"default","tag":"Account","count":59},{"language":"default","tag":"Send","count":39},{"language":"default","tag":"Leads","count":23},{"language":"default","tag":"Campaigns","count":22},{"language":"default","tag":"Webhooks","count":16},{"language":"default","tag":"People","count":14},{"language":"default","tag":"Guide","count":11},{"language":"default","tag":"API Reference","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"agents/reference/upsert-rows","slug":"/agents/reference/upsert-rows","pageMetadata":{"title":"Upsert rows on matchColumns (the single v2 batch write primitive)","description":"v2's one row-write endpoint; there is no bare per-row insert (an\ninsert-only call is just an upsert whose rows match nothing). All writes\ngo through `api_batches` and are idempotent per `batchId`.\n\nRows matching an existing row on **every** `matchColumns` value update\nthat row's input cells; non-matching rows insert. Per-row\n`inserted`/`updated`/`skipped` outcomes are recorded on the batch.\n\n- Row keys and `matchColumns` are **input column slugs** (from\n `GET /tables/{tableId}/columns` → `columns[].slug`), never display\n names. A non-slug row key → `UNKNOWN_FIELDS`.\n- `matchColumns` (required) must be real input columns (`UNKNOWN_COLUMN`)\n and every match value must be present + non-empty on every row\n (`MISSING_MATCH_VALUE`).\n- Duplicate request keys → `DUPLICATE_MATCH_KEY`; multiple existing rows\n match one key → `AMBIGUOUS_MATCH` (409).\n- `enrich` (default true) enriches freshly **inserted** rows.\n- `reenrichUpdated` (default false): set true to also re-run enrichment\n on rows the upsert **updated** (re-spends credits); off by default so an\n upsert never silently re-enriches matched rows.\n\nOnly `input`-kind columns are writable. Enrichment, score, and\n**sequence** columns are populated automatically; sequences are\nagent/column-generated only (see `POST /tables/{tableId}/campaigns`),\nnever set via this endpoint; passing one returns `NON_INPUT_COLUMNS`.\n\nThe response references the tracking object by id: it is an\n`enrichment_run` the caller polls via `GET /enrichment-runs/{runId}`.\n","deprecated":null,"version":null,"sidebarTitle":"Upsert rows","openapi":"/openapi-v2.yaml post /tables/{tableId}/rows/upsert","href":"/agents/reference/upsert-rows","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"v2’s one row-write endpoint; there is no bare per-row insert (an\\ninsert-only call is just an upsert whose rows match nothing). All writes\\ngo through \", _jsx(_components.code, {\n children: \"api_batches\"\n }), \" and are idempotent per \", _jsx(_components.code, {\n children: \"batchId\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Rows matching an existing row on \", _jsx(_components.strong, {\n children: \"every\"\n }), \" \", _jsx(_components.code, {\n children: \"matchColumns\"\n }), \" value update\\nthat row’s input cells; non-matching rows insert. Per-row\\n\", _jsx(_components.code, {\n children: \"inserted\"\n }), \"/\", _jsx(_components.code, {\n children: \"updated\"\n }), \"/\", _jsx(_components.code, {\n children: \"skipped\"\n }), \" outcomes are recorded on the batch.\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Row keys and \", _jsx(_components.code, {\n children: \"matchColumns\"\n }), \" are \", _jsx(_components.strong, {\n children: \"input column slugs\"\n }), \" (from\\n\", _jsx(_components.code, {\n children: \"GET /tables/{tableId}/columns\"\n }), \" → \", _jsx(_components.code, {\n children: \"columns[].slug\"\n }), \"), never display\\nnames. A non-slug row key → \", _jsx(_components.code, {\n children: \"UNKNOWN_FIELDS\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"matchColumns\"\n }), \" (required) must be real input columns (\", _jsx(_components.code, {\n children: \"UNKNOWN_COLUMN\"\n }), \")\\nand every match value must be present + non-empty on every row\\n(\", _jsx(_components.code, {\n children: \"MISSING_MATCH_VALUE\"\n }), \").\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Duplicate request keys → \", _jsx(_components.code, {\n children: \"DUPLICATE_MATCH_KEY\"\n }), \"; multiple existing rows\\nmatch one key → \", _jsx(_components.code, {\n children: \"AMBIGUOUS_MATCH\"\n }), \" (409).\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"enrich\"\n }), \" (default true) enriches freshly \", _jsx(_components.strong, {\n children: \"inserted\"\n }), \" rows.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"reenrichUpdated\"\n }), \" (default false): set true to also re-run enrichment\\non rows the upsert \", _jsx(_components.strong, {\n children: \"updated\"\n }), \" (re-spends credits); off by default so an\\nupsert never silently re-enriches matched rows.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Only \", _jsx(_components.code, {\n children: \"input\"\n }), \"-kind columns are writable. Enrichment, score, and\\n\", _jsx(_components.strong, {\n children: \"sequence\"\n }), \" columns are populated automatically; sequences are\\nagent/column-generated only (see \", _jsx(_components.code, {\n children: \"POST /tables/{tableId}/campaigns\"\n }), \"),\\nnever set via this endpoint; passing one returns \", _jsx(_components.code, {\n children: \"NON_INPUT_COLUMNS\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The response references the tracking object by id: it is an\\n\", _jsx(_components.code, {\n children: \"enrichment_run\"\n }), \" the caller polls via \", _jsx(_components.code, {\n children: \"GET /enrichment-runs/{runId}\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upsert rows on matchColumns (the single v2 batch write primitive)","description":"v2's one row-write endpoint; there is no bare per-row insert (an\ninsert-only call is just an upsert whose rows match nothing). All writes\ngo through `api_batches` and are idempotent per `batchId`.\n\nRows matching an existing row on **every** `matchColumns` value update\nthat row's input cells; non-matching rows insert. Per-row\n`inserted`/`updated`/`skipped` outcomes are recorded on the batch.\n\n- Row keys and `matchColumns` are **input column slugs** (from\n `GET /tables/{tableId}/columns` → `columns[].slug`), never display\n names. A non-slug row key → `UNKNOWN_FIELDS`.\n- `matchColumns` (required) must be real input columns (`UNKNOWN_COLUMN`)\n and every match value must be present + non-empty on every row\n (`MISSING_MATCH_VALUE`).\n- Duplicate request keys → `DUPLICATE_MATCH_KEY`; multiple existing rows\n match one key → `AMBIGUOUS_MATCH` (409).\n- `enrich` (default true) enriches freshly **inserted** rows.\n- `reenrichUpdated` (default false): set true to also re-run enrichment\n on rows the upsert **updated** (re-spends credits); off by default so an\n upsert never silently re-enriches matched rows.\n\nOnly `input`-kind columns are writable. Enrichment, score, and\n**sequence** columns are populated automatically; sequences are\nagent/column-generated only (see `POST /tables/{tableId}/campaigns`),\nnever set via this endpoint; passing one returns `NON_INPUT_COLUMNS`.\n\nThe response references the tracking object by id: it is an\n`enrichment_run` the caller polls via `GET /enrichment-runs/{runId}`.\n","deprecated":null,"version":null,"sidebarTitle":"Upsert rows","openapi":"/openapi-v2.yaml post /tables/{tableId}/rows/upsert","href":"/agents/reference/upsert-rows","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Workspace"],"summary":"Upsert rows on matchColumns (the single v2 batch write primitive)","description":"v2's one row-write endpoint; there is no bare per-row insert (an\ninsert-only call is just an upsert whose rows match nothing). All writes\ngo through `api_batches` and are idempotent per `batchId`.\n\nRows matching an existing row on **every** `matchColumns` value update\nthat row's input cells; non-matching rows insert. Per-row\n`inserted`/`updated`/`skipped` outcomes are recorded on the batch.\n\n- Row keys and `matchColumns` are **input column slugs** (from\n `GET /tables/{tableId}/columns` → `columns[].slug`), never display\n names. A non-slug row key → `UNKNOWN_FIELDS`.\n- `matchColumns` (required) must be real input columns (`UNKNOWN_COLUMN`)\n and every match value must be present + non-empty on every row\n (`MISSING_MATCH_VALUE`).\n- Duplicate request keys → `DUPLICATE_MATCH_KEY`; multiple existing rows\n match one key → `AMBIGUOUS_MATCH` (409).\n- `enrich` (default true) enriches freshly **inserted** rows.\n- `reenrichUpdated` (default false): set true to also re-run enrichment\n on rows the upsert **updated** (re-spends credits); off by default so an\n upsert never silently re-enriches matched rows.\n\nOnly `input`-kind columns are writable. Enrichment, score, and\n**sequence** columns are populated automatically; sequences are\nagent/column-generated only (see `POST /tables/{tableId}/campaigns`),\nnever set via this endpoint; passing one returns `NON_INPUT_COLUMNS`.\n\nThe response references the tracking object by id: it is an\n`enrichment_run` the caller polls via `GET /enrichment-runs/{runId}`.\n","operationId":"upsertRows","x-mint":{"href":"/agents/reference/upsert-rows"},"parameters":["65bbe525-79a6-4e66-8dd5-d8f29f33627e"],"requestBody":"2781de21-a715-4353-9ae7-3e55399be231","responses":{"200":"a8df2f81-1470-4323-9eaf-b80c9a98725e","201":"8d8b6038-2c4f-4d77-85ef-b6c7297ffbb5","400":"96163ecb-9d3a-44ac-a142-dbb1dddc9faa","404":"cb019555-3506-4763-beb8-23388cc1d10d","409":"b7243b45-73b8-45c1-b5e5-4835c1ca8c4b"},"method":"post","type":"path","servers":["3cee4c01-8102-49ac-a706-7d90ac4d7c3a"],"security":["58f4c267-0c2d-44a5-96d2-b88e0b02cb28"],"path":"/tables/{tableId}/rows/upsert","baseUrlOptions":["https://origami.chat/api/v2"],"title":"Upsert rows on matchColumns (the single v2 batch write primitive)","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"65bbe525-79a6-4e66-8dd5-d8f29f33627e":{"in":"header","name":"Idempotency-Key","required":false,"description":"Transport-level replay protection: any v2 `POST` may send it\n(1-255 printable ASCII characters; UUIDs recommended). The first\nresponse for a key is recorded and replayed verbatim for retries\nwith the same key + method/path/body for 24 hours; replayed\nresponses carry the `Idempotency-Replay: true` response header.\nReusing a key with a *different* request, or retrying while the\noriginal is still in flight, returns `409 IDEMPOTENCY_ERROR`.\n5xx responses are never recorded (the retry re-executes).\n","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]{1,255}$","isRequired":false,"description":"Transport-level replay protection: any v2 `POST` may send it\n(1-255 printable ASCII characters; UUIDs recommended). The first\nresponse for a key is recorded and replayed verbatim for retries\nwith the same key + method/path/body for 24 hours; replayed\nresponses carry the `Idempotency-Replay: true` response header.\nReusing a key with a *different* request, or retrying while the\noriginal is still in flight, returns `409 IDEMPOTENCY_ERROR`.\n5xx responses are never recorded (the retry re-executes).\n","uniqueKey":"","typeLabel":"string"}},"332d3194-2d92-41ea-b976-0905eedb6fca":{"in":"path","name":"tableId","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rows","matchColumns"],"properties":{"rows":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"rows.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":100,"isRequired":true,"uniqueKey":"rows","typeLabel":"object[]"},"matchColumns":{"type":"array","items":{"type":"string","uniqueKey":"matchColumns.items.[INDEX]","typeLabel":"string"},"minItems":1,"isRequired":true,"uniqueKey":"matchColumns","typeLabel":"string[]"},"enrich":{"type":"boolean","default":true,"uniqueKey":"enrich","typeLabel":"boolean"},"reenrichUpdated":{"type":"boolean","default":false,"uniqueKey":"reenrichUpdated","typeLabel":"boolean"},"batchId":{"type":"string","format":"uuid","uniqueKey":"batchId","typeLabel":"string\u003cuuid>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"rows":[{}],"matchColumns":["\u003cstring>"],"enrich":true,"reenrichUpdated":false,"batchId":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a8df2f81-1470-4323-9eaf-b80c9a98725e":{"description":"Idempotent replay of an existing `batchId` (same receipt shape).","content":{"application/json":{"schema":{"type":"object","required":["object","id","batchId","tableRunId","counts"],"description":"Response of `POST /tables/{tableId}/rows/upsert` and\n`.../rows/upsert-file`: an `enrichment_run` reference the caller\npolls via `GET /enrichment-runs/{runId}`.\n","properties":{"object":{"type":"string","const":"enrichment_run","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"batchId":{"type":"string","format":"uuid","description":"Legacy alias of `id`.","isRequired":true,"uniqueKey":"batchId","typeLabel":"string\u003cuuid>"},"tableRunId":{"oneOf":[{"type":"string","format":"uuid","description":"Linked table-run parent (`enrich=true` batches only). Lets consumers\npoll `GET /tables/{tableId}/runs/{runId}` or await the\n`table.run.completed` webhook without a version bump.\n`null` for `enrich=false` writes and pre-migration batches.\nCompletion is first-owner scoped: overlapping cells already active\nunder an earlier run are not adopted into this parent, so this run\ncan complete while those cells are still executing elsewhere.\n","isRequired":true,"uniqueKey":"tableRunId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Linked table-run parent (`enrich=true` batches only). Lets consumers\npoll `GET /tables/{tableId}/runs/{runId}` or await the\n`table.run.completed` webhook without a version bump.\n`null` for `enrich=false` writes and pre-migration batches.\nCompletion is first-owner scoped: overlapping cells already active\nunder an earlier run are not adopted into this parent, so this run\ncan complete while those cells are still executing elsewhere.\n","isRequired":true,"uniqueKey":"tableRunId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"tableRunId","typeLabel":"string\u003cuuid> | null"},"counts":{"type":"object","required":["inserted","updated","skipped"],"properties":{"inserted":{"type":"integer","isRequired":true,"uniqueKey":"counts.inserted","typeLabel":"integer"},"updated":{"type":"integer","isRequired":true,"uniqueKey":"counts.updated","typeLabel":"integer"},"skipped":{"type":"integer","isRequired":true,"uniqueKey":"counts.skipped","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"counts","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"enrichment_run","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","batchId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","tableRunId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","counts":{"inserted":123,"updated":123,"skipped":123}}}},"exampleType":"generated"}},"exampleType":"generated"},"8d8b6038-2c4f-4d77-85ef-b6c7297ffbb5":{"description":"The upsert receipt: an `enrichment_run` reference with per-outcome counts.","content":{"application/json":{"schema":{"type":"object","required":["object","id","batchId","tableRunId","counts"],"description":"Response of `POST /tables/{tableId}/rows/upsert` and\n`.../rows/upsert-file`: an `enrichment_run` reference the caller\npolls via `GET /enrichment-runs/{runId}`.\n","properties":{"object":{"type":"string","const":"enrichment_run","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"batchId":{"type":"string","format":"uuid","description":"Legacy alias of `id`.","isRequired":true,"uniqueKey":"batchId","typeLabel":"string\u003cuuid>"},"tableRunId":{"oneOf":[{"type":"string","format":"uuid","description":"Linked table-run parent (`enrich=true` batches only). Lets consumers\npoll `GET /tables/{tableId}/runs/{runId}` or await the\n`table.run.completed` webhook without a version bump.\n`null` for `enrich=false` writes and pre-migration batches.\nCompletion is first-owner scoped: overlapping cells already active\nunder an earlier run are not adopted into this parent, so this run\ncan complete while those cells are still executing elsewhere.\n","isRequired":true,"uniqueKey":"tableRunId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"Linked table-run parent (`enrich=true` batches only). Lets consumers\npoll `GET /tables/{tableId}/runs/{runId}` or await the\n`table.run.completed` webhook without a version bump.\n`null` for `enrich=false` writes and pre-migration batches.\nCompletion is first-owner scoped: overlapping cells already active\nunder an earlier run are not adopted into this parent, so this run\ncan complete while those cells are still executing elsewhere.\n","isRequired":true,"uniqueKey":"tableRunId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"tableRunId","typeLabel":"string\u003cuuid> | null"},"counts":{"type":"object","required":["inserted","updated","skipped"],"properties":{"inserted":{"type":"integer","isRequired":true,"uniqueKey":"counts.inserted","typeLabel":"integer"},"updated":{"type":"integer","isRequired":true,"uniqueKey":"counts.updated","typeLabel":"integer"},"skipped":{"type":"integer","isRequired":true,"uniqueKey":"counts.skipped","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"counts","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"enrichment_run","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","batchId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","tableRunId":"3c90c3cc-0d44-4b50-8888-8dd25736052a","counts":{"inserted":123,"updated":123,"skipped":123}}}},"exampleType":"generated"}},"exampleType":"generated"},"96163ecb-9d3a-44ac-a142-dbb1dddc9faa":{"description":"VALIDATION_ERROR (bad body, more than 100 rows, or empty matchColumns; a JSON upsert exceeding 100 rows returns VALIDATION_ERROR here, not TOO_MANY_ROWS, which is the 413 for the CSV upsert-file endpoint only); UNKNOWN_COLUMN; MISSING_MATCH_VALUE; DUPLICATE_MATCH_KEY; NON_INPUT_COLUMNS; UNKNOWN_FIELDS.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"cb019555-3506-4763-beb8-23388cc1d10d":{"description":"TABLE_NOT_FOUND.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b7243b45-73b8-45c1-b5e5-4835c1ca8c4b":{"description":"AMBIGUOUS_MATCH: multiple existing rows match one key.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"58f4c267-0c2d-44a5-96d2-b88e0b02cb28":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"og_live_...","scopes":[]}}},"servers":{"3cee4c01-8102-49ac-a706-7d90ac4d7c3a":{"url":"https://origami.chat/api/v2","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"og_live_...","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi-v2.yaml"},"subdomain":"origamiagents","siteName":"Origami API","title":"Upsert rows on matchColumns (the single v2 batch write primitive) - Origami API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-25T18:43:12.002Z","originalFileLocation":"agents/reference/upsert-rows.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"v2\u0026#x27;s one row-write endpoint; there is no bare per-row insert (an insert-only call is just an upsert whose rows match nothing). All writes go through api_batches and are idempotent per batchId. Rows matching an existing row on every matchColumns value update that row\u0026#x27;s input cells; non-matching rows insert. Per-row inserted/updated/skipped outcomes are recorded on the batch. - Row keys and matchColumns are input column slugs (from GET /tables/{tableId}/columns → columns[].slug), never display names. A non-slug row key → UNKNOWN_FIELDS. - matchColumns (required) must be real input columns (UNKNOWN_COLUMN) and every match value must be present + non-empty on every row (MISSING_MATCH_VALUE). - Duplicate request keys → DUPLICATE_MATCH_KEY; multiple existing rows match one key → AMBIGUOUS_MATCH (409). - enrich (default true) enriches freshly inserted rows. - reenrichUpdated (default false): set true to also re-run enrichment on rows the upsert updated (re-spends credits); off by default so an upsert never silently re-enriches matched rows. Only input-kind columns are writable. Enrichment, score, and sequence columns are populated automatically; sequences are agent/column-generated only (see POST /tables/{tableId}/campaigns), never set via this endpoint; passing one returns NON_INPUT_COLUMNS. The response references the tracking object by id: it is an enrichment_run the caller polls via GET /enrichment-runs/{runId}.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Origami API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upsert rows on matchColumns (the single v2 batch write primitive) - Origami API\">\u003cmeta data-mint-head property=\"og:description\" content=\"v2\u0026#x27;s one row-write endpoint; there is no bare per-row insert (an insert-only call is just an upsert whose rows match nothing). All writes go through api_batches and are idempotent per batchId. Rows matching an existing row on every matchColumns value update that row\u0026#x27;s input cells; non-matching rows insert. Per-row inserted/updated/skipped outcomes are recorded on the batch. - Row keys and matchColumns are input column slugs (from GET /tables/{tableId}/columns → columns[].slug), never display names. A non-slug row key → UNKNOWN_FIELDS. - matchColumns (required) must be real input columns (UNKNOWN_COLUMN) and every match value must be present + non-empty on every row (MISSING_MATCH_VALUE). - Duplicate request keys → DUPLICATE_MATCH_KEY; multiple existing rows match one key → AMBIGUOUS_MATCH (409). - enrich (default true) enriches freshly inserted rows. - reenrichUpdated (default false): set true to also re-run enrichment on rows the upsert updated (re-spends credits); off by default so an upsert never silently re-enriches matched rows. Only input-kind columns are writable. Enrichment, score, and sequence columns are populated automatically; sequences are agent/column-generated only (see POST /tables/{tableId}/campaigns), never set via this endpoint; passing one returns NON_INPUT_COLUMNS. The response references the tracking object by id: it is an enrichment_run the caller polls via GET /enrichment-runs/{runId}.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Origami API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.origami.chat/agents/reference/upsert-rows\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://origamiagents.mintlify.site/_mintlify/api/og/v2?division=Rows+%26+writes\u0026amp;title=Upsert+rows+on+matchColumns+%28the+single+v2+batch+write+primitive%29\u0026amp;description=v2%27s+one+row-write+endpoint%3B+there+is+no+bare+per-row+insert+%28an%0Ainsert-only+call+is+just+an+upsert+whose+rows+match+nothing%29.+All+writes%0Ago+through+%60api_batche\u0026amp;theme=e0ce817f1c64e26a408cc8e3\u0026amp;signature=3a75bbcd6166bf6f902ead5a4dec52ddd78a9ca9174b2a1b7530d661fa5101d6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upsert rows on matchColumns (the single v2 batch write primitive) - Origami API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"v2\u0026#x27;s one row-write endpoint; there is no bare per-row insert (an insert-only call is just an upsert whose rows match nothing). All writes go through api_batches and are idempotent per batchId. Rows matching an existing row on every matchColumns value update that row\u0026#x27;s input cells; non-matching rows insert. Per-row inserted/updated/skipped outcomes are recorded on the batch. - Row keys and matchColumns are input column slugs (from GET /tables/{tableId}/columns → columns[].slug), never display names. A non-slug row key → UNKNOWN_FIELDS. - matchColumns (required) must be real input columns (UNKNOWN_COLUMN) and every match value must be present + non-empty on every row (MISSING_MATCH_VALUE). - Duplicate request keys → DUPLICATE_MATCH_KEY; multiple existing rows match one key → AMBIGUOUS_MATCH (409). - enrich (default true) enriches freshly inserted rows. - reenrichUpdated (default false): set true to also re-run enrichment on rows the upsert updated (re-spends credits); off by default so an upsert never silently re-enriches matched rows. Only input-kind columns are writable. Enrichment, score, and sequence columns are populated automatically; sequences are agent/column-generated only (see POST /tables/{tableId}/campaigns), never set via this endpoint; passing one returns NON_INPUT_COLUMNS. The response references the tracking object by id: it is an enrichment_run the caller polls via GET /enrichment-runs/{runId}.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://origamiagents.mintlify.site/_mintlify/api/og/v2?division=Rows+%26+writes\u0026amp;title=Upsert+rows+on+matchColumns+%28the+single+v2+batch+write+primitive%29\u0026amp;description=v2%27s+one+row-write+endpoint%3B+there+is+no+bare+per-row+insert+%28an%0Ainsert-only+call+is+just+an+upsert+whose+rows+match+nothing%29.+All+writes%0Ago+through+%60api_batche\u0026amp;theme=e0ce817f1c64e26a408cc8e3\u0026amp;signature=3a75bbcd6166bf6f902ead5a4dec52ddd78a9ca9174b2a1b7530d661fa5101d6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/origamiagents/zjsdEZpGw8t3MGzV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Origami API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#fe7bcd\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.origami.chat/agents/reference/upsert-rows\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agents/reference/upsert-rows.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.origami.chat/#organization\",\"name\":\"Origami API\",\"url\":\"https://docs.origami.chat\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/origamiagents/XHcb8BJCoB-coV4A/logo/light.svg?fit=max\u0026auto=format\u0026n=XHcb8BJCoB-coV4A\u0026q=85\u0026s=f373c14798a59bfb8cedc4284f55a0ca\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.origami.chat#website\",\"name\":\"Origami API\",\"url\":\"https://docs.origami.chat\",\"publisher\":{\"@id\":\"https://docs.origami.chat/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.origami.chat/agents/reference/upsert-rows#webpage\",\"url\":\"https://docs.origami.chat/agents/reference/upsert-rows\",\"name\":\"Upsert rows on matchColumns (the single v2 batch write primitive)\",\"description\":\"v2's one row-write endpoint; there is no bare per-row insert (an insert-only call is just an upsert whose rows match nothing). All writes go through api_batches and are idempotent per batchId. Rows matching an existing row on every matchColumns value update that row's input cells; non-matching rows insert. Per-row inserted/updated/skipped outcomes are recorded on the batch. - Row keys and matchColumns are input column slugs (from GET /tables/{tableId}/columns → columns[].slug), never display names. A non-slug row key → UNKNOWN_FIELDS. - matchColumns (required) must be real input columns (UNKNOWN_COLUMN) and every match value must be present + non-empty on every row (MISSING_MATCH_VALUE). - Duplicate request keys → DUPLICATE_MATCH_KEY; multiple existing rows match one key → AMBIGUOUS_MATCH (409). - enrich (default true) enriches freshly inserted rows. - reenrichUpdated (default false): set true to also re-run enrichment on rows the upsert updated (re-spends credits); off by default so an upsert never silently re-enriches matched rows. Only input-kind columns are writable. Enrichment, score, and sequence columns are populated automatically; sequences are agent/column-generated only (see POST /tables/{tableId}/campaigns), never set via this endpoint; passing one returns NON_INPUT_COLUMNS. The response references the tracking object by id: it is an enrichment_run the caller polls via GET /enrichment-runs/{runId}.\",\"dateModified\":\"2026-08-25T18:43:12.002Z\",\"isPartOf\":{\"@id\":\"https://docs.origami.chat#website\"},\"breadcrumb\":{\"@id\":\"https://docs.origami.chat/agents/reference/upsert-rows#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.origami.chat/agents/reference/upsert-rows#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Origami API\",\"item\":\"https://docs.origami.chat\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upsert rows on matchColumns (the single v2 batch write primitive)\",\"item\":\"https://docs.origami.chat/agents/reference/upsert-rows\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.origami.chat/agents/reference/upsert-rows#apireference\",\"headline\":\"Upsert rows on matchColumns (the single v2 batch write primitive)\",\"name\":\"Upsert rows on matchColumns (the single v2 batch write primitive)\",\"description\":\"v2's one row-write endpoint; there is no bare per-row insert (an insert-only call is just an upsert whose rows match nothing). All writes go through api_batches and are idempotent per batchId. Rows matching an existing row on every matchColumns value update that row's input cells; non-matching rows insert. Per-row inserted/updated/skipped outcomes are recorded on the batch. - Row keys and matchColumns are input column slugs (from GET /tables/{tableId}/columns → columns[].slug), never display names. A non-slug row key → UNKNOWN_FIELDS. - matchColumns (required) must be real input columns (UNKNOWN_COLUMN) and every match value must be present + non-empty on every row (MISSING_MATCH_VALUE). - Duplicate request keys → DUPLICATE_MATCH_KEY; multiple existing rows match one key → AMBIGUOUS_MATCH (409). - enrich (default true) enriches freshly inserted rows. - reenrichUpdated (default false): set true to also re-run enrichment on rows the upsert updated (re-spends credits); off by default so an upsert never silently re-enriches matched rows. Only input-kind columns are writable. Enrichment, score, and sequence columns are populated automatically; sequences are agent/column-generated only (see POST /tables/{tableId}/campaigns), never set via this endpoint; passing one returns NON_INPUT_COLUMNS. The response references the tracking object by id: it is an enrichment_run the caller polls via GET /enrichment-runs/{runId}.\",\"url\":\"https://docs.origami.chat/agents/reference/upsert-rows\",\"mainEntityOfPage\":{\"@id\":\"https://docs.origami.chat/agents/reference/upsert-rows#webpage\"},\"dateModified\":\"2026-08-25T18:43:12.002Z\",\"publisher\":{\"@id\":\"https://docs.origami.chat/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.origami.chat#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Origami API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Origami API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"v3 API","pages":[{"title":"v3 API","href":"/v3/overview"}]},{"tab":"v2 API","groups":[{"group":"Guide","pages":[{"title":"v2 API beta","href":"/agents"},{"title":"Objects and relationships","href":"/agents/objects"},{"title":"Quickstart","href":"/agents/quickstart"},{"title":"Run object","href":"/agents/run-object"},{"title":"Install the skill","href":"/agents/skill"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Projects","pages":[{"title":"List projects (cursor-paginated; ?search=)","deprecated":null,"version":null,"sidebarTitle":"List projects","openapi":"/openapi-v2.yaml get /projects","href":"/agents/reference/list-projects"},{"title":"Create a project (child org)","deprecated":null,"version":null,"sidebarTitle":"Create project","openapi":"/openapi-v2.yaml post /projects","href":"/agents/reference/create-project"},{"title":"Fetch a project","deprecated":null,"version":null,"sidebarTitle":"Get project","openapi":"/openapi-v2.yaml get /projects/{projectId}","href":"/agents/reference/get-project"},{"title":"Update a project's name, budget cap, or enforcement mode","deprecated":null,"version":null,"sidebarTitle":"Update project","openapi":"/openapi-v2.yaml patch /projects/{projectId}","href":"/agents/reference/update-project"},{"title":"Delete a project (two-step; ?confirm=true, ?dryRun=true)","deprecated":null,"version":null,"sidebarTitle":"Delete project","openapi":"/openapi-v2.yaml delete /projects/{projectId}","href":"/agents/reference/delete-project"}]},{"group":"Agents","pages":[{"title":"Create an agent and admit its first run","deprecated":null,"version":null,"sidebarTitle":"Create agent","openapi":"/openapi-v2.yaml post /agents","href":"/agents/reference/create-agent"},{"title":"List agents (cursor-paginated; ?search=)","deprecated":null,"version":null,"sidebarTitle":"List agents","openapi":"/openapi-v2.yaml get /agents","href":"/agents/reference/list-agents"},{"title":"Get an agent","deprecated":null,"version":null,"sidebarTitle":"Get agent","openapi":"/openapi-v2.yaml get /agents/{id}","href":"/agents/reference/get-agent"},{"title":"Archive an agent (soft-delete)","deprecated":null,"version":null,"sidebarTitle":"Archive agent","openapi":"/openapi-v2.yaml delete /agents/{id}","href":"/agents/reference/archive-agent"}]},{"group":"Runs","pages":[{"title":"Send a follow-up run","deprecated":null,"version":null,"sidebarTitle":"Send run","openapi":"/openapi-v2.yaml post /agents/{id}/runs","href":"/agents/reference/send-run"},{"title":"List runs for an agent (cursor-paginated)","deprecated":null,"version":null,"sidebarTitle":"List runs","openapi":"/openapi-v2.yaml get /agents/{id}/runs","href":"/agents/reference/list-runs"},{"title":"Get a run (poll for status / final result)","deprecated":null,"version":null,"sidebarTitle":"Get run","openapi":"/openapi-v2.yaml get /agents/{id}/runs/{runId}","href":"/agents/reference/get-run"},{"title":"Cancel the agent's currently-active run (idempotent, cooperative)","deprecated":null,"version":null,"sidebarTitle":"Cancel run","openapi":"/openapi-v2.yaml post /agents/{id}/cancel","href":"/agents/reference/cancel-run"}]},{"group":"Tables","pages":[{"title":"List tables (cursor-paginated; ?workspaceId=)","deprecated":null,"version":null,"sidebarTitle":"List tables","openapi":"/openapi-v2.yaml get /tables","href":"/agents/reference/list-tables"},{"title":"Get a table: name, leadCount, columns, credits, optional economics","deprecated":null,"version":null,"sidebarTitle":"Get table","openapi":"/openapi-v2.yaml get /tables/{tableId}","href":"/agents/reference/get-table"},{"title":"List tables in the agent's workspace","deprecated":null,"version":null,"sidebarTitle":"List agent tables","openapi":"/openapi-v2.yaml get /agents/{id}/tables","href":"/agents/reference/list-agent-tables"},{"title":"List a table's columns","deprecated":null,"version":null,"sidebarTitle":"List columns","openapi":"/openapi-v2.yaml get /tables/{tableId}/columns","href":"/agents/reference/list-columns"},{"title":"List rows (typed cells; ?cells=flat / ?format=csv)","deprecated":null,"version":null,"sidebarTitle":"List rows","openapi":"/openapi-v2.yaml get /tables/{tableId}/rows","href":"/agents/reference/list-rows"},{"title":"Fetch one row","deprecated":null,"version":null,"sidebarTitle":"Get row","openapi":"/openapi-v2.yaml get /tables/{tableId}/rows/{rowId}","href":"/agents/reference/get-row"},{"title":"Fetch one cell","description":null,"deprecated":null,"version":null,"sidebarTitle":"Get cell","openapi":"/openapi-v2.yaml get /tables/{tableId}/rows/{rowId}/cells/{columnId}","href":"/agents/reference/get-cell"}]},{"group":"Rows \u0026 writes","pages":[{"title":"Upsert rows on matchColumns (the single v2 batch write primitive)","deprecated":null,"version":null,"sidebarTitle":"Upsert rows","openapi":"/openapi-v2.yaml post /tables/{tableId}/rows/upsert","href":"/agents/reference/upsert-rows"},{"title":"Upsert rows from a CSV file (same operation, CSV transport)","description":"The CSV transport for `POST /tables/{tableId}/rows/upsert`: `content`\nis a base64-encoded CSV whose headers are input-column slugs (the same\nkeys as JSON upsert rows) with one record per data row. Identical\nmatch/enrich semantics, identical per-`batchId` idempotency, identical\nrow cap: a CSV with more than **100** data rows is rejected with\n`413 TOO_MANY_ROWS` (split the file or page the JSON upsert).\n","deprecated":null,"version":null,"sidebarTitle":"Upsert rows file","openapi":"/openapi-v2.yaml post /tables/{tableId}/rows/upsert-file","href":"/agents/reference/upsert-rows-file"},{"title":"Bulk soft-delete rows by id","deprecated":null,"version":null,"sidebarTitle":"Delete rows","openapi":"/openapi-v2.yaml delete /tables/{tableId}/rows","href":"/agents/reference/delete-rows"},{"title":"Stop active cell work for a table (the API \"stop\" button)","deprecated":null,"version":null,"sidebarTitle":"Cancel table cells","openapi":"/openapi-v2.yaml post /tables/{tableId}/cancel","href":"/agents/reference/cancel-table-cells"}]},{"group":"Enrichment runs","pages":[{"title":"List enrichment runs (cursor-paginated; ?tableId=)","deprecated":null,"version":null,"sidebarTitle":"List enrichment runs","openapi":"/openapi-v2.yaml get /enrichment-runs","href":"/agents/reference/list-enrichment-runs"},{"title":"Track an enrichment run (incl. per-row upsert outcomes)","deprecated":null,"version":null,"sidebarTitle":"Get enrichment run","openapi":"/openapi-v2.yaml get /enrichment-runs/{runId}","href":"/agents/reference/get-enrichment-run"},{"title":"List a table's enrichment runs (cursor-paginated)","deprecated":null,"version":null,"sidebarTitle":"List table enrichment runs","openapi":"/openapi-v2.yaml get /tables/{tableId}/enrichment-runs","href":"/agents/reference/list-table-enrichment-runs"},{"title":"Get table run","deprecated":null,"version":null,"sidebarTitle":"Get table run","openapi":"/openapi-v2.yaml get /tables/{tableId}/runs/{runId}","href":"/agents/reference/get-table-run"}]},{"group":"Workspaces","pages":[{"title":"List workspaces (cursor-paginated; ?search=)","deprecated":true,"version":null,"sidebarTitle":"List workspaces","openapi":"/openapi-v2.yaml get /workspaces","href":"/agents/reference/list-workspaces"},{"title":"Bootstrap a workspace (upload-first flows)","deprecated":true,"version":null,"sidebarTitle":"Create workspace","openapi":"/openapi-v2.yaml post /workspaces","href":"/agents/reference/create-workspace"},{"title":"Fetch a workspace","deprecated":true,"version":null,"sidebarTitle":"Get workspace","openapi":"/openapi-v2.yaml get /workspaces/{workspaceId}","href":"/agents/reference/get-workspace"},{"title":"Delete a workspace (two-step; ?confirm=true)","deprecated":true,"version":null,"sidebarTitle":"Delete workspace","openapi":"/openapi-v2.yaml delete /workspaces/{workspaceId}","href":"/agents/reference/delete-workspace"}]},{"group":"Documents","pages":[{"title":"List workspace-scoped documents (cursor-paginated)","deprecated":null,"version":null,"sidebarTitle":"List documents","openapi":"/openapi-v2.yaml get /workspaces/{workspaceId}/documents","href":"/agents/reference/list-documents"},{"title":"Upload files into a workspace (the single ingest verb)","deprecated":null,"version":null,"sidebarTitle":"Upload documents","openapi":"/openapi-v2.yaml post /workspaces/{workspaceId}/documents","href":"/agents/reference/upload-documents"},{"title":"Read a document (metadata + content)","deprecated":null,"version":null,"sidebarTitle":"Get document","openapi":"/openapi-v2.yaml get /workspaces/{workspaceId}/documents/{documentId}","href":"/agents/reference/get-document"},{"title":"Rename a document","deprecated":null,"version":null,"sidebarTitle":"Rename document","openapi":"/openapi-v2.yaml patch /workspaces/{workspaceId}/documents/{documentId}","href":"/agents/reference/rename-document"},{"title":"Delete a workspace document","deprecated":null,"version":null,"sidebarTitle":"Delete document","openapi":"/openapi-v2.yaml delete /workspaces/{workspaceId}/documents/{documentId}","href":"/agents/reference/delete-document"}]},{"group":"Campaigns","pages":[{"title":"List a workspace's campaigns","deprecated":null,"version":null,"sidebarTitle":"List workspace campaigns","openapi":"/openapi-v2.yaml get /workspaces/{workspaceId}/campaigns","href":"/agents/reference/list-workspace-campaigns"},{"title":"List campaigns that send from a table","deprecated":null,"version":null,"sidebarTitle":"List table campaigns","openapi":"/openapi-v2.yaml get /tables/{tableId}/campaigns","href":"/agents/reference/list-table-campaigns"},{"title":"Create a campaign on a table (agentic)","deprecated":null,"version":null,"sidebarTitle":"Create campaign","openapi":"/openapi-v2.yaml post /tables/{tableId}/campaigns","href":"/agents/reference/create-campaign"},{"title":"Fetch a campaign","deprecated":null,"version":null,"sidebarTitle":"Get campaign","openapi":"/openapi-v2.yaml get /campaigns/{campaignId}","href":"/agents/reference/get-campaign"},{"title":"Delete a campaign (?confirm=true, ?dryRun=true)","deprecated":null,"version":null,"sidebarTitle":"Delete campaign","openapi":"/openapi-v2.yaml delete /campaigns/{campaignId}","href":"/agents/reference/delete-campaign"},{"title":"List the people in a campaign (keyset-paginated, filtered)","deprecated":null,"version":null,"sidebarTitle":"List campaign people","openapi":"/openapi-v2.yaml get /campaigns/{campaignId}/people","href":"/agents/reference/list-campaign-people"},{"title":"Synonym of GET /campaigns/{campaignId}/people","deprecated":null,"version":null,"sidebarTitle":"List campaign sequences","openapi":"/openapi-v2.yaml get /campaigns/{campaignId}/sequences","href":"/agents/reference/list-campaign-sequences"},{"title":"Campaign performance stats","deprecated":null,"version":null,"sidebarTitle":"Get campaign stats","openapi":"/openapi-v2.yaml get /campaigns/{campaignId}/stats","href":"/agents/reference/get-campaign-stats"},{"title":"Request a content change to a campaign (agentic)","deprecated":null,"version":null,"sidebarTitle":"Edit campaign","openapi":"/openapi-v2.yaml post /campaigns/{campaignId}/edits","href":"/agents/reference/edit-campaign"},{"title":"Launch a campaign: activate + run the launch pipeline (alias /send)","deprecated":null,"version":null,"sidebarTitle":"Launch campaign","openapi":"/openapi-v2.yaml post /campaigns/{campaignId}/launch","href":"/agents/reference/launch-campaign"},{"title":"Alias of POST /campaigns/{campaignId}/launch","deprecated":null,"version":null,"sidebarTitle":"Send campaign","openapi":"/openapi-v2.yaml post /campaigns/{campaignId}/send","href":"/agents/reference/send-campaign"},{"title":"Pause a campaign (idempotent; ?dryRun=true)","deprecated":null,"version":null,"sidebarTitle":"Pause campaign","openapi":"/openapi-v2.yaml post /campaigns/{campaignId}/pause","href":"/agents/reference/pause-campaign"},{"title":"Resume a campaign (idempotent; ?dryRun=true)","deprecated":null,"version":null,"sidebarTitle":"Resume campaign","openapi":"/openapi-v2.yaml post /campaigns/{campaignId}/resume","href":"/agents/reference/resume-campaign"}]},{"group":"Sequences","pages":[{"title":"List sequences (bounded scope, cursor-paginated, filtered)","deprecated":null,"version":null,"sidebarTitle":"List sequences","openapi":"/openapi-v2.yaml get /sequences","href":"/agents/reference/list-sequences"},{"title":"List a table's sequences (cursor-paginated, filtered)","deprecated":null,"version":null,"sidebarTitle":"List table sequences","openapi":"/openapi-v2.yaml get /tables/{tableId}/sequences","href":"/agents/reference/list-table-sequences"},{"title":"Fetch a sequence with steps inline (provider internals redacted)","deprecated":null,"version":null,"sidebarTitle":"Get sequence","openapi":"/openapi-v2.yaml get /sequences/{sequenceId}","href":"/agents/reference/get-sequence"},{"title":"Stop a sequence (header stop; sent history preserved)","deprecated":null,"version":null,"sidebarTitle":"Stop sequence","openapi":"/openapi-v2.yaml post /sequences/{sequenceId}/stop","href":"/agents/reference/stop-sequence"},{"title":"Delete a sequence (?force=true, ?dryRun=true)","deprecated":null,"version":null,"sidebarTitle":"Delete sequence","openapi":"/openapi-v2.yaml delete /sequences/{sequenceId}","href":"/agents/reference/delete-sequence"}]},{"group":"Scheduled agents","pages":[{"title":"List scheduled agents (cursor-paginated; filters workspaceId/enabled)","deprecated":null,"version":null,"sidebarTitle":"List scheduled agents","openapi":"/openapi-v2.yaml get /scheduled-agents","href":"/agents/reference/list-scheduled-agents"},{"title":"Create a scheduled agent (disabled by default)","deprecated":null,"version":null,"sidebarTitle":"Create scheduled agent","openapi":"/openapi-v2.yaml post /scheduled-agents","href":"/agents/reference/create-scheduled-agent"},{"title":"Fetch a scheduled agent (+ planBlocked, last run)","deprecated":null,"version":null,"sidebarTitle":"Get scheduled agent","openapi":"/openapi-v2.yaml get /scheduled-agents/{id}","href":"/agents/reference/get-scheduled-agent"},{"title":"Edit a scheduled agent","deprecated":null,"version":null,"sidebarTitle":"Update scheduled agent","openapi":"/openapi-v2.yaml patch /scheduled-agents/{id}","href":"/agents/reference/update-scheduled-agent"},{"title":"Delete a scheduled agent (soft-delete)","deprecated":null,"version":null,"sidebarTitle":"Delete scheduled agent","openapi":"/openapi-v2.yaml delete /scheduled-agents/{id}","href":"/agents/reference/delete-scheduled-agent"},{"title":"Enable a scheduled agent","deprecated":null,"version":null,"sidebarTitle":"Enable scheduled agent","openapi":"/openapi-v2.yaml post /scheduled-agents/{id}/enable","href":"/agents/reference/enable-scheduled-agent"},{"title":"Disable a scheduled agent","deprecated":null,"version":null,"sidebarTitle":"Disable scheduled agent","openapi":"/openapi-v2.yaml post /scheduled-agents/{id}/disable","href":"/agents/reference/disable-scheduled-agent"},{"title":"Manually trigger a run","deprecated":null,"version":null,"sidebarTitle":"Trigger scheduled agent","openapi":"/openapi-v2.yaml post /scheduled-agents/{id}/trigger","href":"/agents/reference/trigger-scheduled-agent"},{"title":"Run history (failed runs carry a workspace-chat handoff)","deprecated":null,"version":null,"sidebarTitle":"List scheduled agent runs","openapi":"/openapi-v2.yaml get /scheduled-agents/{id}/runs","href":"/agents/reference/list-scheduled-agent-runs"}]},{"group":"Account","pages":[{"title":"Org account overview (plan, capabilities, workspace usage)","deprecated":null,"version":null,"sidebarTitle":"Get account","openapi":"/openapi-v2.yaml get /account","href":"/agents/reference/get-account"},{"title":"Credit balance (supersedes v1 GET /credits)","deprecated":null,"version":null,"sidebarTitle":"Get credits","openapi":"/openapi-v2.yaml get /account/credits","href":"/agents/reference/get-credits"}]},{"group":"Legacy aliases","expanded":false,"pages":[{"title":"Legacy alias: delete a workspace (body-confirm protocol)","deprecated":true,"version":null,"sidebarTitle":"Delete workspace legacy","openapi":"/openapi-v2.yaml post /workspaces/{workspaceId}/delete","href":"/agents/reference/delete-workspace-legacy"},{"title":"Legacy alias: upload files (use POST /workspaces/{workspaceId}/documents)","deprecated":true,"version":null,"sidebarTitle":"Upload documents legacy","openapi":"/openapi-v2.yaml post /workspaces/{workspaceId}/uploads","href":"/agents/reference/upload-documents-legacy"},{"title":"Legacy alias: rename a document (use PATCH .../documents/{documentId})","deprecated":true,"version":null,"sidebarTitle":"Rename document legacy","openapi":"/openapi-v2.yaml post /workspaces/{workspaceId}/documents/{documentId}/rename","href":"/agents/reference/rename-document-legacy"},{"title":"Legacy alias: create a campaign (use POST /tables/{tableId}/campaigns)","deprecated":true,"version":null,"sidebarTitle":"Create sequence legacy","openapi":"/openapi-v2.yaml post /tables/{tableId}/sequences","href":"/agents/reference/create-sequence-legacy"},{"title":"Legacy alias: delete a sequence (use DELETE /sequences/{sequenceId})","deprecated":true,"version":null,"sidebarTitle":"Delete sequence legacy","openapi":"/openapi-v2.yaml post /sequences/{sequenceId}/delete","href":"/agents/reference/delete-sequence-legacy"},{"title":"Legacy alias: list enrichment runs (use GET /enrichment-runs)","deprecated":true,"version":null,"sidebarTitle":"List batches","openapi":"/openapi-v2.yaml get /batches","href":"/agents/reference/list-batches"},{"title":"Legacy alias: track an enrichment run (use GET /enrichment-runs/{runId})","deprecated":true,"version":null,"sidebarTitle":"Get batch","openapi":"/openapi-v2.yaml get /batches/{batchId}","href":"/agents/reference/get-batch"}]}]},{"tab":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks/overview"}]},{"tab":"Deprecated","pages":[{"title":"Deprecated","href":"/api-v2-to-v3-migration"}]}]},"basePath":"","title":"Upsert rows on matchColumns (the single v2 batch write primitive) - Origami API","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}