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

# Create a saved filter

> Allows users to create a new view within their workspace by specifying filters and configurations
for boards, cards, or pages. The request must include a name, type (board, card, or page), and
optional filtering criteria such as projects, members, or time ranges.
Shared views can be created by setting the shared parameter.




## OpenAPI

````yaml POST /{team_id}/views
openapi: 3.0.0
info:
  description: Superthread Public API Specification
  version: '0.1'
  title: Public API
  contact:
    email: engineering@superthread.com
servers:
  - url: https://api.superthread.com/v1
security:
  - BearerAuth: []
tags:
  - name: AI
    description: >-
      [Service: AI]. Handles AI-powered functionalities, such as
      recommendations, predictions, and automation features.
  - name: Activity
    description: >-
      [Service: Activity] Manages all activities; creating notifications and
      digests
  - name: Auth
    description: >-
      [Service: Auth] Responsible for user authentication, authorization, and
      session management.
  - name: Boards
    description: >-
      [Service: Boards] Manages core collaboration features such as "boards",
      "cards", "lists", "sprints", "epics".
  - name: Comments
    description: >-
      [Service: Comments] Handles the creation, editing, and management of
      comments across various entities.
  - name: Favourites
    description: >-
      [Service: Favourites] Responsible for favouriting resources in the system
      for quick access.
  - name: Files
    description: >-
      [Service: Files] Manages file uploads, storage, and retrieval for user and
      project resources.
  - name: Importer
    description: >-
      [Service: Importer] Handles data import operations from external sources
      into the platform.
  - name: Integrations
    description: >-
      [Service: Integrations] Facilitates connectivity with external tools and
      services, enabling smooth integration with third-party platforms and APIs.
  - name: Pages
    description: >-
      [Service: Pages] Manages the creation and organization of both public and
      private pages, supporting structured content and navigation and
      collaboration.
  - name: Projects
    description: '[Service: Projects] Handles all project related tasks.'
  - name: Reports
    description: >-
      [Service: Reports] Generates and manages analytical reports and insights
      for users and projects.
  - name: Search
    description: >-
      [Service: Search] Provides search functionalities, including indexing and
      retrieval of platform data.
  - name: TimeTracking
    description: >-
      [Service: TimeTracking] Manages time entries, active timers, time
      categories, billing rates, and audit/lock for time-tracking workflows.
  - name: Views
    description: >-
      [Feature] Provides tools to create and customize views, enabling users to
      organize and visualize their data according to their preferences and
      workflows.
  - name: OAuth2
    description: >-
      [Feature] Supports OAuth2 integration for seamless user authentication and
      authorization, ensuring secure access to external APIs and services.
  - name: Sprints
    description: >-
      [Feature] Facilitates sprint management within agile workflows, including
      planning, progress tracking, and reporting.
  - name: Cards
    description: >-
      [Feature] A Card is the core concept used in the system to describe an
      individual task or work item. They are used across Boards, Sprints, and
      Roadmaps. Cards include features like descriptions, checklists, comments,
      priorities, tags and more.
  - name: Checklists
    description: >-
      [Feature] A Checklist is a list of items that need to be completed. It is
      used to track progress on a card.
  - name: Lists
    description: >-
      [Feature] Represents a collection of tasks or items grouped within
      different contexts in the system. Lists (externally referenced as
      "statuses") are utilized across various entities such as boards, sprints,
      and roadmaps.
  - name: Notes
    description: >-
      [Feature] Enables users to create, edit, and organize notes, supporting
      rich text, attachments, transcriptions and AI enhancements.
  - name: Tags
    description: >-
      [Feature] Groups endpoints related to the creation, retrieval, updating,
      deletion, and merging of tags within teams (workspaces).
  - name: Agents
    description: >-
      [Feature] Manages agents and runs. Provides CRUD operations for agents,
      launching cloud agents, monitoring agent status, retrieving conversations,
      and sending follow-ups.
paths:
  /{team_id}/views:
    parameters:
      - $ref: '#/components/parameters/path_team_id'
    post:
      tags:
        - Views
      summary: Create a view
      description: >
        Allows users to create a new view within their workspace by specifying
        filters and configurations

        for boards, cards, or pages. The request must include a name, type
        (board, card, or page), and

        optional filtering criteria such as projects, members, or time ranges.

        Shared views can be created by setting the shared parameter.
      operationId: viewCreate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateViewRequest'
        description: Fields for creation
        required: true
      responses:
        '200':
          description: created view response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/View'
        default:
          description: client error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/Error'
components:
  parameters:
    path_team_id:
      in: path
      name: team_id
      description: >-
        Team ID is an alphanumerical string that identifies a Team. This is
        externally referred to as a "Workspace".
      required: true
      schema:
        type: string
  schemas:
    CreateViewRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/ViewFilters'
      properties:
        name:
          type: string
          example: my view
        type:
          type: string
          example: card
          enum:
            - board
            - card
            - page
        shared:
          type: boolean
          example: false
    View:
      type: object
      allOf:
        - $ref: '#/components/schemas/ViewFilters'
      properties:
        id:
          type: string
          example: '1'
        team_id:
          type: string
          example: tARGLH5d
        owner_user_id:
          type: string
          example: u2DdoERz
        type:
          type: string
          example: card
          enum:
            - board
            - card
            - page
        name:
          type: string
          example: my view
        shared:
          type: boolean
          example: false
        time_created:
          $ref: '#/components/schemas/STime'
        time_updated:
          $ref: '#/components/schemas/STime'
    Error:
      type: object
      properties:
        id:
          type: string
          example: err5f744ab
        code:
          type: integer
          format: int32
          example: 403
        sec:
          $ref: '#/components/schemas/SuperthreadErrorCode'
        message:
          type: string
          example: You do not have access to this resource
          description: A user-friendly error message
        date:
          $ref: '#/components/schemas/STime'
    ViewFilters:
      type: object
      properties:
        board_filters:
          type: object
          properties:
            time_created:
              $ref: '#/components/schemas/DateRangeFilter'
            time_updated:
              $ref: '#/components/schemas/DateRangeFilter'
            include:
              $ref: '#/components/schemas/BoardViewFilter'
            exclude:
              $ref: '#/components/schemas/BoardViewFilter'
            sort_by:
              $ref: '#/components/schemas/ViewBoardSortBy'
          nullable: true
        card_filters:
          type: object
          properties:
            is_parent:
              type: boolean
              x-omitempty: true
              nullable: true
            is_child:
              type: boolean
              x-omitempty: true
              nullable: true
            has_estimate:
              type: boolean
              description: Filter on cards that have an estimate
              x-omitempty: true
              nullable: true
            has_members:
              type: boolean
              description: 'Filter on either: no members or at least 1 member assigned'
              x-omitempty: true
              nullable: true
            has_priority:
              type: boolean
              description: Filter on cards that have a priority
              x-omitempty: true
              nullable: true
            has_status:
              type: boolean
              description: Filter on cards that have a non empty status
              x-omitempty: true
              nullable: true
            has_tags:
              type: boolean
              description: Filter on cards that have no tags or at least 1 tag
              x-omitempty: true
              nullable: true
            has_linked_card:
              type: boolean
              description: Filter on cards that have no links or at least 1 link
              x-omitempty: true
              nullable: true
            has_due_date:
              type: boolean
              description: Filter on cards that have a non empty due date
              x-omitempty: true
              nullable: true
            has_start_date:
              type: boolean
              description: Filter on cards that have a non empty start date
              x-omitempty: true
              nullable: true
            has_completed_date:
              type: boolean
              description: Filter on cards that have a non empty completed date
              x-omitempty: true
              nullable: true
            has_parent_card:
              type: boolean
              description: Filter on cards that have a parent card
              x-omitempty: true
              nullable: true
            is_archived:
              type: boolean
              description: Filter on cards that are archived
              x-omitempty: true
              nullable: true
            is_watching:
              type: boolean
              description: Filter on cards that the current user is watching
              x-omitempty: true
              nullable: true
            created_from_form:
              type: boolean
              description: Filter on cards that were created from a form submission
              x-omitempty: true
              nullable: true
            start_date:
              $ref: '#/components/schemas/DateRangeFilter'
            completed_date:
              $ref: '#/components/schemas/DateRangeFilter'
            due_date:
              $ref: '#/components/schemas/DateRangeFilter'
            time_created:
              $ref: '#/components/schemas/DateRangeFilter'
            time_updated:
              $ref: '#/components/schemas/DateRangeFilter'
            include:
              $ref: '#/components/schemas/CardViewFilter'
            exclude:
              $ref: '#/components/schemas/CardViewFilter'
            sort_by:
              $ref: '#/components/schemas/ViewCardSortBy'
          nullable: true
        page_filters:
          type: object
          properties:
            is_archived:
              type: boolean
              description: Filter on pages that are archived
              x-omitempty: true
              nullable: true
            time_created:
              $ref: '#/components/schemas/DateRangeFilter'
            time_updated:
              $ref: '#/components/schemas/DateRangeFilter'
            include:
              $ref: '#/components/schemas/PageViewFilter'
            exclude:
              $ref: '#/components/schemas/PageViewFilter'
            sort_by:
              $ref: '#/components/schemas/ViewPageSortBy'
          nullable: true
    STime:
      type: integer
      format: int64
      example: 1608742037016
      description: unix timestamp in seconds
      x-go-type:
        type: STime
        import:
          package: github.com/superthread-com/common/pkg/types
        hints:
          noValidation: true
          kind: primitive
    SuperthreadErrorCode:
      type: string
      description: |
        Superthread Error Code (`SEC`): A structured error code.
        Format: `SEC:{ServiceID}-{InternalErrorCode}`.


          - `SEC`: Prefix for all structured error codes.
          - `ServiceID`: First 3 characters identify the service, '000' is reserved for generic errors.
          - `InternalErrorCode`: the next (last) 5 characters define the specific error.
      pattern: ^SEC:\d{3}-\d{5}$
      example: SEC:000-00014
    DateRangeFilter:
      type: object
      description: >-
        Expects unix time in seconds for each property but also supports date
        math such as 'now-1d/d', which reads as current time minus yesterday
        rounded down to the start of the day.
      properties:
        before:
          type: string
          description: >-
            before is inclusive, meaning that you can pass 0 to include empty
            dates
          example: now-1d
        after:
          type: string
          description: >-
            after is exclusive, meaning that you can pass 0 to exclude empty
            dates
          example: 1620997103||-2h
    BoardViewFilter:
      type: object
      properties:
        ids:
          type: array
          description: List of board ids
          x-omitempty: true
          items:
            type: string
        content:
          type: string
        projects:
          type: array
          description: List of project ids
          x-omitempty: true
          items:
            type: string
        creators:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
        members:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
    ViewBoardSortBy:
      type: object
      properties:
        field:
          type: string
          enum:
            - time_created
            - time_updated
        order_ascending:
          type: boolean
      example:
        field: time_created
        order_ascending: true
    CardViewFilter:
      type: object
      properties:
        ids:
          type: array
          description: List of card ids
          x-omitempty: true
          items:
            type: string
        content:
          type: string
        title:
          type: string
        boards:
          type: array
          description: List of board ids
          x-omitempty: true
          items:
            type: string
        estimates:
          type: array
          description: >-
            List of integers representing effort estimation enum for the card. 0
            is unset. 1 is least, 5 is greatest. will map to different values
            depending on project settings.
          x-omitempty: true
          items:
            type: integer
        lists:
          type: array
          description: List of list ids
          x-omitempty: true
          items:
            type: string
        priority:
          type: array
          description: List of integers representing priorities
          x-omitempty: true
          items:
            type: integer
        projects:
          type: array
          description: List of project ids
          x-omitempty: true
          items:
            type: string
        creators:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
        owners:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
        members:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
        statuses:
          type: array
          description: List of card statuses
          x-omitempty: true
          items:
            $ref: '#/components/schemas/CardStatus'
        external_links:
          type: array
          description: List of external link types
          x-omitempty: true
          items:
            $ref: '#/components/schemas/ExternalLinkType'
        linked_cards:
          type: array
          description: List of link card types
          x-omitempty: true
          items:
            $ref: '#/components/schemas/LinkedCardType'
        tags:
          type: array
          description: List of tag ids
          x-omitempty: true
          items:
            type: string
        parent_cards:
          type: array
          description: List of parent card ids
          x-omitempty: true
          items:
            type: string
        epics:
          type: array
          description: List of epics ids
          x-omitempty: true
          items:
            type: string
    ViewCardSortBy:
      type: object
      properties:
        field:
          type: string
          enum:
            - time_created
            - time_updated
            - status
            - priority
            - due_date
            - estimate
        order_ascending:
          type: boolean
      example:
        field: time_created
        order_ascending: true
    PageViewFilter:
      type: object
      properties:
        ids:
          type: array
          description: List of page ids
          x-omitempty: true
          items:
            type: string
        content:
          type: string
        projects:
          type: array
          description: List of project ids
          x-omitempty: true
          items:
            type: string
        creators:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
        members:
          type: array
          description: List of user ids
          x-omitempty: true
          items:
            type: string
    ViewPageSortBy:
      type: object
      properties:
        field:
          type: string
          enum:
            - time_created
            - time_updated
        order_ascending:
          type: boolean
      example:
        field: time_created
        order_ascending: true
    CardStatus:
      type: string
      enum:
        - committed
        - started
        - completed
        - cancelled
      example: started
    ExternalLinkType:
      type: string
      enum:
        - github_pull_request
        - generic
    LinkedCardType:
      type: string
      enum:
        - blocks
        - blocked_by
        - related
        - duplicates
      example: blocks
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````