---
title: "Create a view"
method: POST
path: "/views.create"
tags: ["Views"]
---

# Create a view

`POST /views.create`

Creates a new view for a document. This is documented in the interests of thoroughness however it is recommended that views are not created from outside of the Outline UI.

## Request body

- object
  - `documentId` string, uuid, required

## Response `200`

OK

- object
  - `data` View
    - `id` string — Unique identifier for the object.
    - `documentId` string, uuid — Identifier for the associated document.
    - `firstViewedAt` string, date-time — When the document was first viewed by the user
    - `lastViewedAt` string, date-time — When the document was last viewed by the user
    - `count` number — The number of times the user has viewed the document.
    - `user` User
      - `id` string, uuid — Unique identifier for the object.
      - `name` string — The name of this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if neccessary.
      - `avatarUrl` string, uri — The URL for the image associated with this user, it will be displayed in the application UI and email notifications.
      - `email` string, email — The email associated with this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if neccessary.
      - `role` 'admin' | 'member' | 'viewer' | 'guest'
      - `isSuspended` boolean — Whether this user has been suspended.
      - `lastActiveAt` string, date-time — The last time this user made an API request, this value is updated at most every 5 minutes.
      - `createdAt` string, date-time — The date and time that this user first signed in or was invited as a guest.

## Other responses

- `401` — The API key is missing or otherwise invalid.
- `403` — The current API key is not authorized to perform this action.

---

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