---
title: "Create a new view"
method: POST
path: "/v1/views"
tags: ["Views"]
---

# Create a new view

`POST /v1/views`

## Request

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

Creates a new dashboard view with the provided details.

## Request body

- ViewInput
  - `name` string, required
  - `data` union[], required
    - union
      - string
      - object
        - `id` string
        - `params` object
  - `columns` object
  - `icon` string
  - `type` 'llm' | 'thread' | 'trace', required

## 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)
