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

# Update File

> Update a file



## OpenAPI

````yaml PUT /files/{file_id}
openapi: 3.0.0
info:
  title: Cloudglue API
  description: API for Cloudglue
  license:
    name: Apache License 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.7.8
servers:
  - url: https://api.cloudglue.dev/v1
security:
  - bearerAuth: []
paths:
  /files/{file_id}:
    put:
      tags:
        - Files
      summary: Update a file
      description: Update a file
      operationId: updateFile
      parameters:
        - name: file_id
          in: path
          required: true
          description: The ID of the file to update
          schema:
            type: string
      requestBody:
        description: File update parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUpdate'
        required: true
      responses:
        '200':
          description: Successful file update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          description: Invalid request or malformed file update parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FileUpdate:
      type: object
      properties:
        metadata:
          type: object
          description: Optional user-provided metadata about the file
        filename:
          type: string
          description: New filename for the file
    File:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - not_applicable
          description: Processing status of the file
        bytes:
          type: integer
          nullable: true
          description: Size of the file in bytes, null if not available
        created_at:
          type: integer
          description: Unix timestamp in milliseconds when the file was created
        filename:
          type: string
          description: Original filename
        uri:
          type: string
          description: Cloudglue URI for the file, to be used in other API calls
        metadata:
          type: object
          nullable: true
          description: User-provided metadata about the file, null if none provided
        media_type:
          type: string
          enum:
            - video
            - audio
            - image
          description: >-
            Type of media file (video, audio, or image). Images are processed at
            the file level only (no segmentation).
        media_info:
          type: object
          properties:
            duration_seconds:
              type: number
              nullable: true
              description: Duration in seconds
            width:
              type: integer
              nullable: true
              description: Width in pixels (null for audio files)
            height:
              type: integer
              nullable: true
              description: Height in pixels (null for audio files)
            sample_rate:
              type: integer
              nullable: true
              description: Audio sample rate in Hz
            channels:
              type: integer
              nullable: true
              description: Number of audio channels
            bitrate:
              type: integer
              nullable: true
              description: Audio bitrate in bps
            format:
              type: string
              nullable: true
              description: File format
            has_audio:
              type: boolean
              nullable: true
              description: Whether the file has audio
          description: Unified media information for video, audio, and image files
        video_info:
          type: object
          properties:
            duration_seconds:
              type: number
              nullable: true
              description: Duration of the video in seconds, null if not available
            height:
              type: integer
              nullable: true
              description: Height of the video in pixels, null if not available
            width:
              type: integer
              nullable: true
              description: Width of the video in pixels, null if not available
            format:
              type: string
              nullable: true
              description: Format of the video file, null if not available
            has_audio:
              type: boolean
              nullable: true
              description: Whether the video has audio, null if not available
          description: Information about the video content
        thumbnail_url:
          type: string
          description: URL of the thumbnail for the file
        source:
          type: string
          enum:
            - video
            - youtube
            - s3
            - dropbox
            - http
            - upload
            - google-drive
            - zoom
            - gong
            - recall
            - gcs
            - grain
            - loom
          description: Source of the file
        source_metadata:
          allOf:
            - $ref: '#/components/schemas/SourceMetadata'
          nullable: true
          description: >-
            Source provenance captured from the upstream connector at ingest
            time. Null when nothing was captured (older files, or a connector
            that does not yet populate it).
      required:
        - id
        - uri
        - status
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    SourceMetadata:
      oneOf:
        - $ref: '#/components/schemas/GrainSourceMetadata'
      discriminator:
        propertyName: source_type
        mapping:
          grain:
            $ref: '#/components/schemas/GrainSourceMetadata'
      description: >-
        Per-source provenance captured from the upstream connector. Currently
        only Grain is populated.
    GrainSourceMetadata:
      type: object
      description: >-
        Source provenance captured from Grain at ingest time. The richer
        AI/contextual fields are only present when Grain returns them.
      properties:
        source_type:
          type: string
          enum:
            - grain
          description: Discriminator identifying the upstream connector.
        grain_recording_id:
          type: string
          description: Grain's recording id.
        title:
          type: string
          description: Recording title.
        start_datetime:
          type: string
          format: date-time
          description: UTC time Grain started the recording.
        end_datetime:
          type: string
          format: date-time
          description: UTC time the recording ended.
        duration_ms:
          type: integer
          description: Recording duration in milliseconds.
        media_type:
          type: string
          enum:
            - audio
            - transcript
            - video
          description: Grain media type of the recording.
        upstream_source:
          type: string
          enum:
            - aircall
            - local_capture
            - meet
            - teams
            - upload
            - webex
            - zoom
            - other
          description: Platform Grain captured the recording from.
        grain_url:
          type: string
          description: URL to the recording in Grain.
        thumbnail_url:
          type: string
          nullable: true
          description: Thumbnail URL, null if none.
        tags:
          type: array
          items:
            type: string
          description: Tags applied to the recording.
        teams:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
          description: Teams the recording belongs to.
        meeting_type:
          type: object
          nullable: true
          properties:
            id:
              type: string
            name:
              type: string
            scope:
              type: string
          description: Recording's meeting type, null if none.
        participants:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              email:
                type: string
                nullable: true
              scope:
                type: string
                enum:
                  - internal
                  - external
                  - unknown
              confirmed_attendee:
                type: boolean
              hs_contact_id:
                type: string
                nullable: true
                description: HubSpot contact id, if linked.
          nullable: true
          description: >-
            Meeting participants (include-gated by Grain). Null when requested
            but empty.
        highlights:
          type: array
          items:
            type: object
          nullable: true
          description: Clips / highlights (include-gated). Null when requested but empty.
        ai_summary:
          type: object
          properties:
            text:
              type: string
              description: Markdown AI summary.
          nullable: true
          description: AI summary (include-gated). Null when requested but empty.
        ai_action_items:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                enum:
                  - pending
                  - completed
              timestamp_ms:
                type: integer
                description: Time in the recording the item was mentioned.
              text:
                type: string
              assignee:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  user_id:
                    type: string
                    nullable: true
          nullable: true
          description: AI action items (include-gated). Null when requested but empty.
        ai_template_sections:
          type: array
          items:
            type: object
          nullable: true
          description: >-
            AI template sections, shape varies by template (include-gated). Null
            when requested but empty.
        calendar_event:
          type: object
          nullable: true
          properties:
            ical_uid:
              type: string
          description: Related calendar event (include-gated).
        hubspot:
          type: object
          properties:
            hubspot_company_ids:
              type: array
              items:
                type: string
            hubspot_deal_ids:
              type: array
              items:
                type: string
          nullable: true
          description: >-
            Related HubSpot company/deal ids (include-gated). Null when
            requested but empty.
      required:
        - source_type
        - grain_recording_id
        - title
        - start_datetime
        - end_datetime
        - duration_ms
        - media_type
        - upstream_source
        - grain_url
        - tags
        - teams
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````