# Change definitions key views viewId

Edits a saved view's `label`, `filter`, `sort` or `columnIds`; an absent field is left alone. A user view is editable only by the person who owns it and a workspace view only by a workspace admin — anyone else's view is a 404, never a 403. Answers 204.

Access class: `def:read`.

## Endpoint

`PATCH /v1/definitions/{key}/views/{viewId}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| viewId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "columnIds": [
      "string"
    ],
    "filter": {},
    "label": "string",
    "sort": {}
  },
  "params": {
    ":key": "string",
    ":viewId": ""
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
