> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create saved view

> Save a query as a reusable view.

```http theme={null}
POST /api/v1/saved_views
```

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST http://localhost:5080/api/v1/saved_views \
    -H "authorization: Bearer $MS_JWT" \
    -H 'content-type: application/json' \
    -d '{
      "name": "Recent errors",
      "language": "sql",
      "statement": "SELECT * FROM app WHERE level = '\''error'\''",
      "time_range_secs": 3600,
      "stream": "app",
      "tags": ["operations"],
      "pinned": true
    }'
  ```
</RequestExample>

`time_range_secs` must be from 1 to 31,622,400. Creating a view requires
`saved_views.create`.
