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

# Update Directory

> Update a directory (rename and/or color change)



## OpenAPI

````yaml /api-reference/openapi.json put /directories/{directory_id}
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /directories/{directory_id}:
    put:
      tags:
        - Directories
      summary: Update Directory
      description: Update a directory (rename and/or color change)
      operationId: put_Directories_directories_directory_id
      parameters:
        - name: directory_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Directory Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectoryUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryUpdateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DirectoryUpdateRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: New name for the directory
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
          description: 'Hex color code for the directory icon (e.g. #1277B5)'
        client_performed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Client Performed At
          description: >-
            When the client performed this action. Defaults to server time if
            not provided.
      type: object
      title: DirectoryUpdateRequest
      description: API request schema for updating a directory
    DirectoryUpdateResponse:
      properties:
        is_symlink:
          type: boolean
          title: Is Symlink
          description: True when this item is a projected symlink
          default: false
        target_path:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Target Path
          description: Symlink target path components
        target_path_type:
          anyOf:
            - $ref: '#/components/schemas/SymlinkTargetPathType'
            - type: 'null'
          description: Symlink target path type
        target_resource_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Target Resource Id
          description: Resolved target resource ID
        target_resource_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Resource Name
          description: Resolved target resource name
        target_resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
          description: Resolved or hinted target resource type
        target_resolution_status:
          anyOf:
            - $ref: '#/components/schemas/SymlinkResolutionStatus'
            - type: 'null'
          description: Symlink resolution status
        id:
          type: string
          format: uuid
          title: Id
          description: Directory ID
        name:
          type: string
          title: Name
          description: Directory name
        color:
          type: string
          title: Color
          description: Hex color code for the directory icon
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: ID of the project this directory belongs to
        parent_id:
          type: string
          format: uuid
          title: Parent Id
          description: ID of the parent resource (directory or project)
        actions:
          anyOf:
            - type: integer
            - type: 'null'
          title: Actions
          description: User's permission bitmap on this directory
        created_by_user_id:
          type: string
          format: uuid
          title: Created By User Id
          description: ID of the user that created the directory
        revision_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Revision Id
          description: ID of the revision created by this operation
        is_latest:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Latest
          description: Whether the revision is the overall latest
        created:
          type: string
          format: date-time
          title: Created
          description: Creation timestamp
        updated:
          type: string
          format: date-time
          title: Updated
          description: Last update timestamp
      type: object
      required:
        - id
        - name
        - color
        - project_id
        - parent_id
        - created_by_user_id
        - created
        - updated
      title: DirectoryUpdateResponse
      description: API response schema for updating a directory
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SymlinkTargetPathType:
      type: string
      enum:
        - relative
        - internal_absolute
        - external_absolute
      title: SymlinkTargetPathType
    ResourceType:
      type: string
      enum:
        - workspace
        - project
        - directory
        - asset
        - symlink
        - collection
      title: ResourceType
      description: |-
        Types of resources in the system hierarchy.

        - Python enum value (``.value``) is the lowercase wire format, e.g.
          ``"workspace"``. This is what crosses the JSON boundary.
        - Python enum name (``.name``) is the uppercase identifier used as the
          PostgreSQL ENUM literal, e.g. ``'WORKSPACE'`` — SQLAlchemy uses
          ``.name`` by default for ``sa.Enum`` columns, so no DB migration is
          needed when this pattern is adopted.

        Raw SQL comparisons against the ``resources.type`` column must use
        ``.name`` (not ``.value``) to match the PG ENUM literal.
    SymlinkResolutionStatus:
      type: string
      enum:
        - resolved
        - dangling
        - permission_denied
        - external
      title: SymlinkResolutionStatus
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````