---
title: "Create Metric View"
method: POST
path: "/api/domains/{domain_id}/metrics/{metric_ref}/views"
tags: ["metrics"]
---

# Create Metric View

`POST /api/domains/{domain_id}/metrics/{metric_ref}/views`

## Request

- Base URL: `https://api-v1.unusual.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-v1.unusual.ai/api/domains/{domain_id}/metrics/{metric_ref}/views`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Pin the current view: ``{name, query: {color, facet, filters,
breakout}, sentence?}``. The query is checked against the plan first.
Superuser only (the lead's call on the record).

## Path parameters

- `metric_ref` string, required
- `domain_id` string, required

## Headers

- `x-view-as` string, nullable

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/unusual/apis/dashboard-server.md) - [All operations](https://skmtc.dev/unusual/apis/dashboard-server/llms.txt) - [OpenAPI document](https://skmtc.dev/unusual/apis/dashboard-server/revisions/89f716930ead?raw)
