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

# List accessible saved views

> Returns views owned by the authenticated user plus views shared with them. The response also includes tag entities referenced by returned view scopes.



## OpenAPI

````yaml /api-reference/openapi.json post /list-views
openapi: 3.1.0
info:
  title: Memex REST API
  description: Memex REST API endpoints.
  version: '2026-03-10'
servers:
  - url: https://memex.garden/api
    description: Public edge router
  - url: https://rubctkzqxcdgkbbcprnu.supabase.co/functions/v1
    description: Direct Supabase Edge Functions
security:
  - bearerAuth: []
paths:
  /list-views:
    post:
      summary: List accessible saved views
      description: >-
        Returns views owned by the authenticated user plus views shared with
        them. The response also includes tag entities referenced by returned
        view scopes.
      operationId: listViews
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmptyRequest'
            examples:
              default:
                summary: List views
                value: {}
      responses:
        '200':
          description: View list response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListViewsResponse'
        '401':
          description: Authentication required or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    EmptyRequest:
      type: object
      additionalProperties: false
    ListViewsResponse:
      type: object
      required:
        - views
        - tagEntities
      properties:
        views:
          type: array
          items:
            $ref: '#/components/schemas/ViewListItem'
        tagEntities:
          type: array
          items:
            $ref: '#/components/schemas/TagEntity'
      additionalProperties: false
    UnauthorizedError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Unauthorized
      additionalProperties: true
    InternalServerError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          example: Internal server error
        message:
          type: string
      additionalProperties: true
    ViewListItem:
      allOf:
        - $ref: '#/components/schemas/ViewEntity'
        - type: object
          required:
            - accessRole
          properties:
            accessRole:
              $ref: '#/components/schemas/ViewAccessRole'
            access:
              $ref: '#/components/schemas/ViewAccessSummary'
            ownerProfile:
              oneOf:
                - $ref: '#/components/schemas/PublicUserProfile'
                - type: 'null'
            sharing:
              $ref: '#/components/schemas/ViewSharingSummary'
          additionalProperties: true
    TagEntity:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        name:
          type: string
        created_at:
          type: number
          description: Unix timestamp in milliseconds.
        updated_at:
          type: number
          description: Unix timestamp in milliseconds.
      additionalProperties: true
    ViewEntity:
      type: object
      required:
        - id
        - userId
        - title
        - description
        - scope
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        userId:
          type: string
        title:
          type: string
        description:
          type: string
        favicon:
          type: string
        scope:
          $ref: '#/components/schemas/ViewScopeV1'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: false
    ViewAccessRole:
      type: string
      enum:
        - owner
        - viewer
        - writer
    ViewAccessSummary:
      type: object
      required:
        - ownerUserId
        - writeUserIds
        - readUserIds
      properties:
        ownerUserId:
          type: string
        writeUserIds:
          type: array
          items:
            type: string
        readUserIds:
          type: array
          items:
            type: string
      additionalProperties: false
    PublicUserProfile:
      type: object
      required:
        - userId
      properties:
        userId:
          type: string
        name:
          type:
            - string
            - 'null'
        bio:
          type:
            - string
            - 'null'
        picture:
          type:
            - string
            - 'null'
        socials:
          type: object
          additionalProperties: true
      additionalProperties: true
    ViewSharingSummary:
      type: object
      required:
        - sharedResourceId
        - accessMode
        - grants
      properties:
        sharedResourceId:
          type: string
        accessMode:
          type: string
          enum:
            - public_link
            - public_link_contribute
            - private
        publicToken:
          type: string
        grants:
          type: array
          items:
            type: object
            additionalProperties: true
        links:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    ViewScopeV1:
      type: object
      required:
        - version
        - expression
      properties:
        version:
          type: integer
          const: 1
        expression:
          $ref: '#/components/schemas/ViewExpression'
        defaults:
          type: object
          properties:
            sortBy:
              type: string
              enum:
                - date-desc
                - date-asc
            includeNotes:
              type: boolean
          additionalProperties: false
      additionalProperties: false
    ViewExpression:
      oneOf:
        - $ref: '#/components/schemas/ViewQueryExpression'
        - $ref: '#/components/schemas/ViewTagExpression'
        - $ref: '#/components/schemas/ViewContentTypeExpression'
        - $ref: '#/components/schemas/ViewTimeExpression'
        - $ref: '#/components/schemas/ViewLibraryExpression'
        - $ref: '#/components/schemas/ViewFeedExpression'
        - $ref: '#/components/schemas/ViewGroupExpression'
        - $ref: '#/components/schemas/ViewNotExpression'
    ViewQueryExpression:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          const: query
        text:
          type: string
      additionalProperties: false
    ViewTagExpression:
      type: object
      required:
        - type
        - tagId
      properties:
        type:
          type: string
          const: tag
        tagId:
          type: string
      additionalProperties: false
    ViewContentTypeExpression:
      type: object
      required:
        - type
        - contentType
      properties:
        type:
          type: string
          const: contentType
        contentType:
          $ref: '#/components/schemas/ContentEntityType'
      additionalProperties: false
    ViewTimeExpression:
      type: object
      required:
        - type
        - field
      properties:
        type:
          type: string
          const: time
        field:
          type: string
          enum:
            - contentCreatedAt
        start:
          type: number
          description: Unix timestamp in milliseconds.
        end:
          type: number
          description: Unix timestamp in milliseconds.
      additionalProperties: false
    ViewLibraryExpression:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          const: library
      additionalProperties: false
    ViewFeedExpression:
      type: object
      required:
        - type
        - feedId
        - entryScope
      properties:
        type:
          type: string
          const: feed
        feedId:
          type: string
        entryScope:
          $ref: '#/components/schemas/ViewFeedEntryScope'
      additionalProperties: false
    ViewGroupExpression:
      type: object
      required:
        - type
        - operator
        - children
      properties:
        type:
          type: string
          const: group
        operator:
          $ref: '#/components/schemas/ViewExpressionOperator'
        children:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ViewExpression'
      additionalProperties: false
    ViewNotExpression:
      type: object
      required:
        - type
        - child
      properties:
        type:
          type: string
          const: not
        child:
          $ref: '#/components/schemas/ViewExpression'
      additionalProperties: false
    ContentEntityType:
      type: string
      enum:
        - web
        - pdf
        - youtube
        - twitter
        - instagram
        - tiktok
        - facebook
        - linkedin
        - pinterest
        - reddit
        - chatgpt
        - claude
        - annotation
        - image
        - transcribedMedia
        - audioRecording
        - selector
        - chatThread
        - twitterProfile
        - subreddit
        - youtubeChannel
      description: Exact persisted `content_entity.type` value.
    ViewFeedEntryScope:
      type: string
      enum:
        - all
        - saved
    ViewExpressionOperator:
      type: string
      enum:
        - AND
        - OR
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.