---
title: "Create a view"
description: "Saves a named mention filter. It uses the same fields as GET /v1/mentions, where a list matches any value, a `not` list matches none, and all conditions are joined by AND. `anyOf` adds groups of such conditions, at least one of which must match. An empty filter shows all mentions. Nothing is stored ahead of time, so a view shows whatever matches when you read it."
canonical: https://docs.rumoro.dev/api/views/create-view
markdown: https://docs.rumoro.dev/api/views/create-view.mdx
---

# Create a view

`POST /v1/views`

Saves a named mention filter. It uses the same fields as GET /v1/mentions, where a list matches any value, a `not` list matches none, and all conditions are joined by AND. `anyOf` adds groups of such conditions, at least one of which must match. An empty filter shows all mentions. Nothing is stored ahead of time, so a view shows whatever matches when you read it.

## Body

| Field | Required | Description |
| --- | --- | --- |
| `name` | yes | Must be unique in the workspace, ignoring case. |
| `description` |  | The view's purpose, shown below its name. |
| `filter` |  | The view's filter. Empty means all mentions. |

## Responses

| Status | Meaning |
| --- | --- |
| 201 | The new view |
| 400 | The filter is not valid, for example an empty anyOf group |
| 401 | The API key is missing or not valid |
| 409 | This name is already used by a view (duplicate_view) |

The [OpenAPI document](https://api.rumoro.dev/v1/openapi.json) has every schema. Rules shared by all endpoints are in [Conventions](https://docs.rumoro.dev/conventions.mdx).
