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

# Update file

> Update a workspace file



## OpenAPI

````yaml https://api.getcargo.io/openapi.json put /content/files/{uuid}
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /content/files/{uuid}:
    put:
      tags:
        - Content - Files
      summary: Update file
      description: Update a workspace file
      parameters:
        - in: path
          name: uuid
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
            title: UUID
            description: File identifier.
          required: true
          description: File identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  title: Name
                  description: File name.
                  type: string
                folderUuid:
                  title: Folder UUID
                  description: Folder identifier to move the file into.
                  anyOf:
                    - type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                    - type: 'null'
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  file:
                    allOf:
                      - type: object
                        properties:
                          uuid:
                            type: string
                          workspaceUuid:
                            type: string
                          libraryUuid:
                            type: string
                          userUuid:
                            anyOf:
                              - type: string
                              - type: 'null'
                          name:
                            type: string
                          isTemporary:
                            type: boolean
                          folderUuid:
                            anyOf:
                              - type: string
                              - type: 'null'
                          s3Filename:
                            type: string
                          openAiFileId:
                            type: string
                          contentType:
                            type: string
                          size:
                            type: number
                          isIndexedInOpenAiVectorStore:
                            type: boolean
                          externalId:
                            anyOf:
                              - type: string
                              - type: 'null'
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          deletedAt:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - uuid
                          - workspaceUuid
                          - libraryUuid
                          - userUuid
                          - name
                          - isTemporary
                          - folderUuid
                          - s3Filename
                          - openAiFileId
                          - contentType
                          - size
                          - isIndexedInOpenAiVectorStore
                          - externalId
                          - createdAt
                          - updatedAt
                          - deletedAt
                        additionalProperties: false
                      - anyOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: connector
                              connectorUuid:
                                type: string
                            required:
                              - kind
                              - connectorUuid
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: native
                            required:
                              - kind
                            additionalProperties: false
                    title: File
                    description: Updated file details.
                required:
                  - file
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````