# Update Folder (Rename Only)

Updates the name of an existing folder.

<Callout icon="📘" theme="info">
  **Note:**

  * Scroll down to the **Response** section below and expand the status code(s) to view the detailed response schema.
  * Refer to the **RESPONSE** section on the right and choose an example to see how the API response appears for each status code.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "heygen-api",
    "version": "4.0.8"
  },
  "servers": [
    {
      "url": "https://api.heygen.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header",
        "x-default": "<your-api-key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/folders/{folder_id}": {
      "post": {
        "summary": "Update Folder (Rename Only)",
        "description": "Updates the name of an existing folder.",
        "operationId": "update-folder",
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Unique identifier of the folder where the video is stored. Can be retrieved from the <a href=\"https://docs.heygen.com/reference/list-folders\" target=\"_blank\">List Folders</a> endpoint. "
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New name to assign to the folder. "
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": null,
                      "data": {
                        "id": "61b2e7f17b174849895576ce042894a2",
                        "name": "AI Avatar Videos Folder",
                        "parent_id": null,
                        "project_type": "video_translate",
                        "is_trash": false,
                        "created_ts": 1760972268,
                        "updated_ts": 1760972268,
                        "direct_children_count": null,
                        "creator_username": "65ebafd83a8532f0b8d56a1dc8a4cee2"
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Displays error message when the request fails; null if the request is successful."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of the updated folder, same as the original folder's ID."
                        },
                        "name": {
                          "type": "string",
                          "description": "Updated name of the folder."
                        },
                        "parent_id": {
                          "type": "string",
                          "description": "Unique identifier of the parent folder. `null` if the folder is at root level."
                        },
                        "project_type": {
                          "type": "string",
                          "description": "Type of project associated with the folder. For example, `video_translate`, `instant_avatar`, `video`, `asset`, `brand_kit`, and `mixed`.  "
                        },
                        "is_trash": {
                          "type": "boolean",
                          "description": "Whether the folder is in the trash. "
                        },
                        "created_ts": {
                          "type": "integer",
                          "description": "Unix timestamp when the folder was originally created. "
                        },
                        "updated_ts": {
                          "type": "integer",
                          "description": "Unix timestamp when the folder was updated. "
                        },
                        "direct_children_count": {
                          "type": "integer",
                          "description": "Number of subfolders directly contained within the folder.  "
                        },
                        "creator_username": {
                          "type": "string",
                          "description": "Unique identifier of the user who created the folder. "
                        }
                      },
                      "description": "Contains details of the updated folder."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```