# Create a cost view

Source: https://docs.levelfour.ai/api-reference/cost-views/post-cost-views


## POST /api/v1/cost-views

### Authentication

Send `Authorization: Bearer <token>`.

### Request body

Required. Content type `application/json`.

- `name` (string, required)
- `providers` (array of string)
- `filters` (map of string to array of string)
- `filter_modes` (map of string to string)
- `group_by` (array of string)
- `show_cost_as` (one of `unblended`, `blended`, `amortized`, `net_unblended`, `net_amortized`, default `net_amortized`)

### Responses

#### 201: Successful Response

- `success` (boolean, default `true`)
- `timestamp` (date-time string)
- `data` (object, required)
  - `name` (string, required)
  - `providers` (array of string)
  - `filters` (map of string to array of string)
  - `filter_modes` (map of string to string)
  - `group_by` (array of string)
  - `show_cost_as` (one of `unblended`, `blended`, `amortized`, `net_unblended`, `net_amortized`, default `net_amortized`)
  - `id` (string, required)
  - `created_by` (string, required)

#### Errors

- `400`: Bad Request
- `401`: Authentication Error
- `403`: Authorization Error
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Rate Limit Exceeded
- `500`: Internal Server Error

Body of `400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`:

- `success` (`false`, required)
- `error` (object, required)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (any)
- `timestamp` (date-time string, required)
