info:
  name: Update Collection
  type: http
  seq: 4
http:
  method: PUT
  url: '{{base_url}}/api/collections/{{collection_id}}'
  auth: inherit
  body:
    type: json
    jsonBody: "{\n    \"name\": \"Sci-Fi Favorites\",\n    \"description\": \"Updated\
      \ description\",\n    \"color\": \"#00ff00\",\n    \"icon\": \"⭐\",\n    \"\
      auto_assign_rules\": [\n      {\n        \"id\": \"rule-2\",\n        \"field\"\
      : \"series\",\n        \"operator\": \"equals\",\n        \"value\": \"Foundation\"\
      ,\n        \"priority\": 9"

docs: |-
  ## Update Collection
  
    Updates an existing collection's properties.
    
    **Method:** PUT
    
    **Endpoint:** /api/collections/{collection_id}
    
    **Authentication:** Required (Bearer token)
    
    **Path Parameters:**
    - `collection_id` (string): Collection ID
    
    **Request Body:**
    - `name` (string, optional): New collection name
    - `description` (string, optional): New description
    - `color` (string, optional): New hex color code
    - `icon` (string, optional): New emoji icon
    - `auto_assign_rules` (array, optional): Updated auto-assignment rules
    
    **Response:**
    - Updated collection object
    
    **Status Codes:**
    - 200: Success
    - 400: Invalid request
    - 401: Unauthorized
    - 404: Collection not found
    - 409: Collection name already exists
