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

# Update File Visibility

> Sets who can see a file: only its owner, the whole workspace, or anyone with the link.



## OpenAPI

````yaml api-reference/tess-public-api.openapi.json PATCH /files/{fileId}/visibility
openapi: 3.0.0
info:
  title: Tess API
  version: '0.1'
servers:
  - url: https://api.tess.im
security: []
paths:
  /files/{fileId}/visibility:
    patch:
      tags:
        - Files
      summary: Update file visibility
      description: >-
        Sets who can see a file: only its owner, the whole workspace, or anyone
        with the link.
      operationId: updateFileVisibility
      parameters:
        - name: fileId
          in: path
          required: true
          schema:
            type: integer
        - name: x-workspace-id
          in: header
          description: >-
            Workspace id. If not provided, the user's selected workspace is
            used.
          required: false
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - visibility
              properties:
                visibility:
                  type: string
                  enum:
                    - private
                    - workspace
                    - public
              type: object
      responses:
        '200':
          description: Successful response
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      bearerFormat: Bearer
      scheme: bearer

````

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