> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new view!



## OpenAPI

````yaml post /v1/views
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: '1.0'
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: production
security:
  - bearerAuth: []
tags:
  - name: Thena Platform APIs
    description: ''
paths:
  /v1/views:
    post:
      tags:
        - Views
      summary: Create a new view!
      operationId: ViewsController_createView
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateViewBody'
      responses:
        '201':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonViewResponse'
        '401':
          description: User is not authenticated!
        '403':
          description: User does not have access to this resource!
        '404':
          description: Resource not found!
        '429':
          description: Too many requests!
        '500':
          description: Something went wrong!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    CreateViewBody:
      type: object
      properties:
        name:
          type: string
          description: The name of the view
          example: My View
        description:
          type: string
          description: The description of the view
          example: My View Description
        teamId:
          type: string
          description: The team id of the view
          example: T00M677SAK
        viewsTypeId:
          type: string
          description: The views type id of the view
          example: 3ENSBTAJ10QG1HAFYYNHADB58PKM5
        isShared:
          type: boolean
          description: The shared flag of the view
          example: true
        configuration:
          type: object
          description: The configuration of the view
      required:
        - name
        - description
        - teamId
        - viewsTypeId
        - isShared
        - configuration
    CommonViewResponse:
      type: object
      properties:
        status:
          type: boolean
          default: true
          description: The status of the response
        message:
          type: string
          default: Success
          description: The message of the response
        timestamp:
          format: date-time
          type: string
          default: '2024-01-01T00:00:00.000Z'
          description: The timestamp of the response
        data:
          description: The response for create/update/delete view operations
          allOf:
            - $ref: '#/components/schemas/ViewsResponseDto'
      required:
        - status
        - message
        - timestamp
        - data
    ViewsResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the view
        teamId:
          type: string
          description: The unique identifier of the team of the view
        viewId:
          type: number
          description: The view ID of the view
        name:
          type: string
          description: The name of the view
        description:
          type: string
          description: The description of the view
        configuration:
          type: object
          description: The JSON configuration containing view settings and filters
        viewsTypeId:
          type: string
          description: The views type ID of the view
        viewsType:
          type: string
          description: The views type of the view
        owner:
          type: string
          description: The name of the owner of the view
        ownerId:
          type: string
          description: The unique identifier of the owner of the view
        isShared:
          type: boolean
          description: Indicates if the view is shared
        isPersonal:
          type: boolean
          description: Indicates if the view is personal
        createdAt:
          format: date-time
          type: string
          description: The creation date of the view
        updatedAt:
          format: date-time
          type: string
          description: The update date of the view
      required:
        - id
        - teamId
        - viewId
        - name
        - description
        - configuration
        - viewsTypeId
        - viewsType
        - owner
        - ownerId
        - isShared
        - isPersonal
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Enter the bearer token

````