---
title: "Upsert Row in Table"
method: POST
path: "/v1/table/{table_id}/row/upsert"
tags: ["Table"]
---

# Upsert Row in Table

`POST /v1/table/{table_id}/row/upsert`

Add or update a row in the specified table based on a unique column value.

## Path parameters

- `table_id` string, uuid, required

## Request body

- UpsertTableRows
  - `context` BaseRequestContext
    - `projectId` string, uuid
    - `processPublicId` string, uuid, nullable
    - `processSectionPublicId` string, uuid, nullable
    - `processResponsePublicId` string, uuid, nullable
  - `rows` TableRowAction[], required
    - `context` BaseRequestContext
      - `projectId` string, uuid
      - `processPublicId` string, uuid, nullable
      - `processSectionPublicId` string, uuid, nullable
      - `processResponsePublicId` string, uuid, nullable
    - `rowData` object, required
    - `sortOrder` number
  - `upsertColumnName` string, required

## Response `200`

Successfully upserted rows in the table view.

- object
  - `metadata` object
  - `data` object[]
    - `publicId` string
    - `rowData` object
    - `sortOrder` number

## Other responses

- `403` — Unauthorized action - User lacks necessary permissions.
- `404` — Table not found.

---

[API](https://skmtc.dev/morta-technology/apis/morta-api-reference.md) · [All operations](https://skmtc.dev/morta-technology/apis/morta-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/morta-technology/morta-api-reference/revisions/9c58c1c1e7e8/schema)
