# Restore Folder

Restores a previously deleted folder, returning it to its original location. 

<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}/restore": {
      "post": {
        "summary": "Restore Folder",
        "description": "",
        "operationId": "restore-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. "
          }
        ],
        "responses": {
          "200": {
            "description": "Folder restored successfully - Expand to view the detailed response schema.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": null,
                      "data": {
                        "id": "b275004e1f104dc482c89ea15a2d80nd",
                        "name": "Folder for Deletion",
                        "parent_id": null,
                        "project_type": "mixed",
                        "is_trash": false,
                        "created_ts": 1761033688,
                        "updated_ts": 1761033688,
                        "direct_children_count": null,
                        "creator_username": "2kebafd83f8541f0b8d76a14c8b4ce12"
                      }
                    }
                  }
                },
                "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 restored folder, same as the original folder's ID. "
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the restored 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 restored 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. `false` if successfully restored. "
                        },
                        "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 restored folder.  "
                        },
                        "creator_username": {
                          "type": "string",
                          "description": "Unique identifier of the user who created the folder. "
                        }
                      },
                      "description": "Contains information about the restored folder. "
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```