---
title: "Update a view"
method: PATCH
path: "/api/v1/views/{viewId}"
tags: ["Visibility & Mentions"]
---

# Update a view

`PATCH /api/v1/views/{viewId}`

## Request

- Base URL: `https://app.promptingco.com`
- URL: `https://app.promptingco.com/api/v1/views/{viewId}`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

Updates the supplied fields of a view. Setting isDefault to true clears the default flag on the brand's other views.

## Path parameters

- `viewId` string, required

## Request body

- object
  - `name` string
  - `description` string, nullable
  - `isDefault` boolean

## Response `200`

Successful response

- object
  - `ok` true, required
  - `data` unknown

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `422`: Validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api.md) - [All operations](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/revisions/c0451ea10e9a?raw)
