---
title: "Create a View"
method: POST
path: "/v3/views"
tags: ["Views"]
---

# Create a View

`POST /v3/views`

**Create a view.**

A view is a tabular projection over the `transformations` produced by
one or more functions. Each column declares a `valueSchemaPath` — a JSON
Pointer path into the function's output schema — and the view can
additionally carry filters and aggregations.

Supported for every function type that produces correctable
transformations and an output schema: `extract`, `transform`, `analyze`,
`join`. Extract works on both vision (PDF/PNG/JPEG/HEIC/HEIF/WebP) and
OCR-routed inputs — the resulting rows surface through views uniformly.

The new view is created at `versionNum: 1`. Subsequent updates produce
new versions; the version-1 configuration remains addressable.

## Request body

- ViewCreateRequest — Request to create a new view or update an existing view
  - `name` string, required — Name of the view
  - `description` string — Description of the view
  - `columns` ViewColumn[], required — List of columns in the view
    - `name` string, required — Name of the column
    - `valueSchemaPath` string[], required — JSON path to the value in the transformation output schema (e.g., ["invoiceDetails", "invoiceNumber"])
    - `displayOrderIndex` integer, required — Order in which this column should be displayed (0-based index)
  - `filters` ViewFilter[], required — List of filters applied to the view
    - `columnName` string, required — Name of the column to filter on
    - `filterType` 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null', required — Type of filter to apply to a view column
    - `string` string, nullable — String value for the filter (required for string filter types)
    - `number` number, float, nullable — Numeric value for the filter (required for number filter types)
  - `aggregations` ViewAggregation[], required — List of aggregations defined for the view
    - `name` string, required — Name of the aggregation
    - `function` 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max', required — Aggregation function to apply to a view column
    - `aggregateColumnName` string, nullable — Name of the column to aggregate (required for count_distinct, sum, average, min, max functions)
    - `groupByColumnName` string, nullable — Name of the column to group by (optional, for grouped aggregations)
    - `displayType` 'table' | 'bar_chart' | 'pie_chart' — How to display the aggregation results
  - `functions` FunctionIdentifier[], required — List of functions that this view queries transformations from
    - `id` string — Unique identifier of function. Provide either id or name, not both.
    - `name` string — Name of function. Must be UNIQUE on a per-environment basis. Provide either id or name, not both.

## Response `200`

The request has succeeded.

- View — A view is a table visualization of transformations that allows customers to have insight into their transformations
  - `viewID` string, required — Unique identifier of the view
  - `name` string, required — Name of the view
  - `description` string, nullable — Description of the view
  - `currentVersionNum` integer, required — Current version number of the view
  - `columns` ViewColumn[], required — List of columns in the view
    - `name` string, required — Name of the column
    - `valueSchemaPath` string[], required — JSON path to the value in the transformation output schema (e.g., ["invoiceDetails", "invoiceNumber"])
    - `displayOrderIndex` integer, required — Order in which this column should be displayed (0-based index)
  - `filters` ViewFilter[], required — List of filters applied to the view
    - `columnName` string, required — Name of the column to filter on
    - `filterType` 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null', required — Type of filter to apply to a view column
    - `string` string, nullable — String value for the filter (required for string filter types)
    - `number` number, float, nullable — Numeric value for the filter (required for number filter types)
  - `aggregations` ViewAggregation[], required — List of aggregations defined for the view
    - `name` string, required — Name of the aggregation
    - `function` 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max', required — Aggregation function to apply to a view column
    - `aggregateColumnName` string, nullable — Name of the column to aggregate (required for count_distinct, sum, average, min, max functions)
    - `groupByColumnName` string, nullable — Name of the column to group by (optional, for grouped aggregations)
    - `displayType` 'table' | 'bar_chart' | 'pie_chart' — How to display the aggregation results
  - `functions` FunctionIdentifier[], required — List of functions that this view queries transformations from
    - `id` string — Unique identifier of function. Provide either id or name, not both.
    - `name` string — Name of function. Must be UNIQUE on a per-environment basis. Provide either id or name, not both.

---

[API](https://skmtc.dev/bem-team/apis/bem-api.md) · [All operations](https://skmtc.dev/bem-team/apis/bem-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bem-team/bem-api/revisions/a6e4624117c6/schema)
