---
title: "Create Object View"
method: POST
path: "/objects/{object_slug}/views"
tags: ["Objects"]
---

# Create Object View

`POST /objects/{object_slug}/views`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/objects/{object_slug}/views`
- Auth: HTTP bearer

Save a private or shared view owned by this credential, without impersonating a human.

## Path parameters

- `object_slug` string, required

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- ObjectViewCreate
  - `title` string, required
  - `visibility` 'private' | 'org': Who can apply a view. Only the creator can update or delete it.
  - `state` ObjectViewState
    - `version` 1
    - `layout` 'table' | 'board'
    - `filters` RecordFilter[]
      - `attribute_slug` string, required
      - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'starts_with' | 'in' | 'is_null' | 'is_not_null', required
      - `value` unknown
    - `search` string
    - `sortBy` string, nullable
    - `sortOrder` 'asc' | 'desc'
    - `includeArchived` boolean
    - `columns` string[], nullable
    - `groupBy` string, nullable

## Response `201`

Successful Response

- ApiResponseSavedViewResponse
  - `data` SavedViewResponse, required: Response shape — flat shape with state at top level for convenience.
    - `id` string, uuid, required
    - `entity_type` 'custom_objects' | 'contacts' | 'companies' | 'deals' | 'leads' | 'lists' | 'contacts_view' | 'companies_view' | 'list_contacts' | 'list_companies' | 'search_people' | 'search_companies' | 'abm_companies' | 'enrichment_workbench' | 'enrichment_workbenches', required: Which CRM grid the saved view applies to. Free-form string at the DB level (cb_saved_views.entity_type is VARCHAR(50)) to avoid a schema migration when we add deals/tasks/leads — but enforced as an enum at the API boundary so we don't accept typos. NEITHER A SUBSET NOR A SUPERSET OF ``FilterEntityType`` — see the invariant on that class, and the sibling docstring below, which states the same relationship from the other side. The two enums overlap on the four GRID values (``contacts``, ``companies``, ``deals``, ``leads``); ``FilterEntityType`` is a superset of THOSE and adds ``report``, while the nine list/view/search/workbench members here have no counterpart there. Custom objects additionally use an object-bound view context. (This paragraph previously read "DELIBERATELY NARROWER THAN ``FilterEntityType``", which inverted the relationship: this is the LARGER enum. The narrowness that matters is real but specific — ``report`` is excluded, and only ``report`` — so stating it as a general containment invited exactly the wrong conclusion about the other nine.) Native grid members can be saved with ``context_key = NULL`` for reuse across that entity type. CUSTOM_OBJECTS is the exception: it requires an immutable object context and the object-authorized endpoints. It must never enter the native grids' reusable saved-filter menus.
    - `context_key` string, nullable, required
    - `is_reusable` boolean, required
    - `is_default` boolean, required
    - `visibility` 'private' | 'org', required: Who can apply a view. Only the creator can update or delete it.
    - `title` string, required
    - `description` string, nullable, required
    - `state` object, required
    - `created_by` string, required
    - `created_at` string, date-time, nullable, required
    - `updated_at` string, date-time, nullable, required
    - `is_owner` boolean, required
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
