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

# Update Content

> Update content metadata and status.

Allows updating content fields such as name, description, metadata,
and processing status. The content data itself cannot be modified.

Args:
    content_id: The unique identifier for the content
    content_update: Fields to update
    
Returns:
    Updated content
    
Example:
    PATCH /contents/con_abc123xyz
    Body:
    {
        "name": "Updated Document Name",
        "description": "New description",
        "metadata": {"category": "important"},
        "status": "completed"
    }

Raises:
    404: If content not found
    400: If validation fails



## OpenAPI

````yaml api-reference/openapi.json patch /api/v1/contents/{content_id}
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/contents/{content_id}:
    patch:
      tags:
        - Contents
      summary: Update Content
      description: |-
        Update content metadata and status.

        Allows updating content fields such as name, description, metadata,
        and processing status. The content data itself cannot be modified.

        Args:
            content_id: The unique identifier for the content
            content_update: Fields to update
            
        Returns:
            Updated content
            
        Example:
            PATCH /contents/con_abc123xyz
            Body:
            {
                "name": "Updated Document Name",
                "description": "New description",
                "metadata": {"category": "important"},
                "status": "completed"
            }

        Raises:
            404: If content not found
            400: If validation fails
      operationId: update_content_api_v1_contents__content_id__patch
      parameters:
        - name: content_id
          in: path
          required: true
          schema:
            type: string
            title: Content Id
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    ContentUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Content name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Content description
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Content metadata
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Content processing status
        sync_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Sync Status
          description: Sync status
        status_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Message
          description: Status message
        definition:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition
          description: Content definition
      type: object
      title: ContentUpdate
      description: Schema for updating content.
    ContentRead:
      properties:
        id:
          type: string
          title: Id
          description: Content ID
        name:
          type: string
          title: Name
          description: Content name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Content description
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Content metadata
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Content type/MIME type
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
          description: Content size in bytes
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Content processing status
        sync_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Sync Status
          description: Sync status
        status_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Message
          description: Status message
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
          description: Content hash
        file_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: File Data
          description: File data information
        definition:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition
          description: Content definition
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
          description: Creation timestamp
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
          description: Update timestamp
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External system ID
        collection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Collection Id
          description: Collection ID
        workspace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workspace Id
          description: Workspace ID
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Content configuration
        linked_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Linked To
          description: Linked content ID
        access_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Access Count
          description: Number of times accessed
      type: object
      required:
        - id
        - name
      title: ContentRead
      description: Schema for reading content.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    DualAuthScheme:
      type: http
      scheme: bearer

````