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

# Update a folder

> Rename a folder, move it by changing `parentId`, or do both in one request. Send `parentId: null` to move the folder to the root. Convertly rejects moves into the same folder or one of its descendants.



## OpenAPI

````yaml /openapi.json patch /api/folders/{id}
openapi: 3.1.0
info:
  title: Convertly API
  version: 1.0.0
  description: >-
    Convertly provides production API endpoints for media conversion,
    compression, Image CDN delivery, Forma AI, HLS/DASH video streaming, media
    tools, async jobs, workflows, webhooks, and Convertly Storage.
  license:
    name: Proprietary
    url: https://convertly.sh/terms
servers:
  - url: https://convertly.sh
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /api/folders/{id}:
    patch:
      tags:
        - Files
      summary: Update a folder
      description: >-
        Rename a folder, move it by changing `parentId`, or do both in one
        request. Send `parentId: null` to move the folder to the root. Convertly
        rejects moves into the same folder or one of its descendants.
      operationId: updateFolder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFolderRequest'
      responses:
        '200':
          description: Updated folder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
components:
  schemas:
    UpdateFolderRequest:
      type: object
      description: At least one of `name` or `parentId` must be provided.
      properties:
        name:
          type: string
          minLength: 1
        parentId:
          type:
            - string
            - 'null'
          format: uuid
    FolderResponse:
      type: object
      properties:
        folder:
          $ref: '#/components/schemas/Folder'
    Folder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        color:
          type: string
        parent_id:
          type:
            - string
            - 'null'
          format: uuid
        created_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - color
        - created_at
    Error:
      type: object
      properties:
        error:
          type: string
        upgradeUrl:
          type: string
      required:
        - error
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Dashboard-generated Convertly API key. Keys currently begin with
        `cvly_`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative API key header for server-side clients.

````