---
title: "Update a view"
method: PATCH
path: "/v1/views/{id}"
tags: ["Views"]
---

# Update a view

`PATCH /v1/views/{id}`

## Request

- Base URL: `https://api.lunary.ai`
- URL: `https://api.lunary.ai/v1/views/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lunary/apis/lunary-api/docs/v1/views/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates an existing view with the provided details.

## Path parameters

- `id` string, required

## Request body

- ViewUpdateInput
  - `name` string
  - `data` union[]
    - union
      - string
      - object
        - `id` string
        - `params` object
  - `columns` object
  - `icon` string

## Response `200`

Successful response

- View
  - `id` string
  - `name` string
  - `data` union[]
    - union
      - string
      - object
        - `id` string
        - `params` object
  - `columns` object
  - `icon` string
  - `type` 'llm' | 'thread' | 'trace'
  - `projectId` string
  - `ownerId` string
  - `updatedAt` string, date-time

---

[API](https://skmtc.dev/lunary/apis/lunary-api.md) - [All operations](https://skmtc.dev/lunary/apis/lunary-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lunary/apis/lunary-api/revisions/a38233713bdc?raw)
