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

# Update Agent Shared File

> Replace the contents of a shared file. The request body must contain exactly one file.



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml put /agents/{agentId}/shared-files/{fileId}
openapi: 3.1.0
info:
  title: Agent Service
  version: v1
servers:
  - description: V2 API
    url: https://odyssey.asteroid.ai/agents/v2
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
  - name: Execution
  - name: Files
  - name: Agent Profiles
  - name: Agent Profile Pools
  - name: Workflows
  - name: Schema
  - name: Documentation
  - name: Context
paths:
  /agents/{agentId}/shared-files/{fileId}:
    put:
      tags:
        - Files
      summary: Update Agent Shared File
      description: >-
        Replace the contents of a shared file. The request body must contain
        exactly one file.
      operationId: AgentSharedFilesUpdate
      parameters:
        - in: path
          name: agentId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
        - in: path
          name: fileId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
      requestBody:
        content:
          multipart/form-data:
            encoding:
              files:
                contentType: text/plain
            schema:
              properties:
                files:
                  items:
                    $ref: '#/components/schemas/Agents.Files.FilePart'
                  type: array
              required:
                - files
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agents.Files.SharedFile'
          description: The request has succeeded.
        '400':
          content:
            text/plain:
              schema:
                enum:
                  - Invalid file upload request.
                type: string
          description: The server could not understand the request due to invalid syntax.
        '404':
          content:
            text/plain:
              schema:
                enum:
                  - File not found.
                type: string
          description: The server cannot find the requested resource.
      deprecated: true
components:
  schemas:
    Common.uuid:
      format: uuid
      type: string
    Agents.Files.FilePart:
      format: binary
      type: string
    Agents.Files.SharedFile:
      description: A file in the agent's persistent shared storage
      properties:
        agentId:
          $ref: '#/components/schemas/Common.uuid'
        checksum:
          description: >-
            Hex-encoded SHA-256 of the file contents. Used for change and rename
            detection when diffing versions. Absent when the checksum is
            unknown.
          type: string
        createdAt:
          format: date-time
          type: string
        downloadUrl:
          format: uri
          type: string
        fileName:
          type: string
        filePath:
          type: string
        fileSize:
          format: int64
          type: integer
        id:
          $ref: '#/components/schemas/Common.uuid'
        isFrozen:
          type: boolean
        lastModifiedByExecutionId:
          $ref: '#/components/schemas/Common.uuid'
        mimeType:
          type: string
        updatedAt:
          format: date-time
          type: string
        version:
          type: integer
      required:
        - id
        - agentId
        - filePath
        - fileName
        - fileSize
        - createdAt
        - updatedAt
        - version
        - isFrozen
        - downloadUrl
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Asteroid-Agents-Api-Key
      type: apiKey

````