---
title: "Add or update rows in a table"
method: POST
path: "/v1/table/views/{view_id}/rows/upsert"
tags: ["Table View"]
---

# Add or update rows in a table

`POST /v1/table/views/{view_id}/rows/upsert`

Upsert (add or update) rows in a table view based on a specified column.

## Path parameters

- `view_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 view 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)
