---
updatedAt: 2026-04-20T20:26:21.000Z
agentTools:
  projectIndex: https://docs.wistia.com/llms.txt
---

# Delete Subfolder

Deletes one subfolder and moves its media to the folder's root level. The subfolder is soft-deleted and is no longer accessible via the API. To delete multiple subfolders and their media, use the Bulk Delete Subfolders endpoint.

## Requires api token with one of the following permissions
```
Read, update & delete anything
```

Tokens with the "Act with a team member's permissions" permission
(`all:delegate_to_contact_permissions` scope) can also be used. Requests
made with such a token are authorized using the permissions of the
contact assigned to the token.

An [expiring access token](https://docs.wistia.com/reference/post_expiring-token)
created with the `all:delegate_to_contact_permissions` scope and an
authorization granting the `update` permission on this folder can also
be used.


# OpenAPI definition

````json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Data API",
    "description": "Wistia Data API",
    "version": "2026.09.0"
  },
  "servers": [
    {
      "url": "https://api.wistia.com/modern"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Subfolders"
    }
  ],
  "paths": {
    "/folders/{folderId}/subfolders/{subfolderId}": {
      "delete": {
        "summary": "Delete Subfolder",
        "x-speakeasy-group": "subfolders",
        "x-speakeasy-name-override": "delete",
        "description": "Deletes one subfolder and moves its media to the folder's root level. The subfolder is soft-deleted and is no longer accessible via the API. To delete multiple subfolders and their media, use the Bulk Delete Subfolders endpoint.\n\n## Requires api token with one of the following permissions\n```\nRead, update & delete anything\n```\n\nTokens with the \"Act with a team member's permissions\" permission\n(`all:delegate_to_contact_permissions` scope) can also be used. Requests\nmade with such a token are authorized using the permissions of the\ncontact assigned to the token.\n\nAn [expiring access token](https://docs.wistia.com/reference/post_expiring-token)\ncreated with the `all:delegate_to_contact_permissions` scope and an\nauthorization granting the `update` permission on this folder can also\nbe used.\n",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "description": "The hashed ID of the folder",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "abc123def4"
              ]
            }
          },
          {
            "name": "subfolderId",
            "in": "path",
            "description": "The hashed ID of the subfolder",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "xyz789ghi0"
              ]
            }
          },
          {
            "name": "X-Wistia-API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2026-09"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subfolder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "allOf": [
                    {
                      "type": "object",
                      "description": "A subfolder within a folder that contains media.",
                      "properties": {
                        "hashed_id": {
                          "description": "A unique alphanumeric identifier for this subfolder.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "examples": [
                            "abc123def4"
                          ]
                        },
                        "name": {
                          "description": "The display name of the subfolder.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "examples": [
                            "Marketing Videos"
                          ]
                        },
                        "description": {
                          "description": "A description for the subfolder.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "examples": [
                            "Collection of all marketing and promotional videos"
                          ]
                        },
                        "position": {
                          "description": "The position of this subfolder within its folder, used for ordering.",
                          "type": [
                            "integer",
                            "null"
                          ],
                          "examples": [
                            1
                          ]
                        },
                        "created": {
                          "description": "The date when the subfolder was created.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "examples": [
                            "2024-01-15T10:30:00+00:00"
                          ]
                        },
                        "updated": {
                          "description": "The date when the subfolder was last modified.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "examples": [
                            "2024-01-20T14:45:00+00:00"
                          ]
                        },
                        "cursor": {
                          "description": "A cursor for stable pagination based on current `sort_by` order. You can pass this to `cursor[before]` or `cursor[after]` as a parameter to fetch the records before or after this record in the same sort order. This is only populated if records were fetched with `cursor[enabled]`, or `cursor[before]` or `cursor[after]`.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "hashed_id",
                        "position",
                        "created",
                        "updated"
                      ]
                    }
                  ]
                },
                "example": {
                  "id": 123,
                  "hashed_id": "xyz789ghi0",
                  "name": "Marketing Videos",
                  "description": "Collection of all marketing and promotional videos",
                  "position": 1,
                  "created": "2024-01-15T10:30:00+00:00",
                  "updated": "2024-01-20T14:45:00+00:00"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "A machine-readable identifier for the specific authorization failure.",
                      "type": "string",
                      "enum": [
                        "unauthorized_credentials",
                        "account_inactive",
                        "unauthorized_scope",
                        "unauthorized_params"
                      ]
                    },
                    "error": {
                      "type": "string",
                      "examples": [
                        "Invalid credentials."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, token is valid but account does not have access to feature",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Webinars are not available on your current plan"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Folder or subfolder not found",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Subfolder with ID xyz789ghi0 not found."
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Internal server error"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Subfolders"
        ],
        "x-readme": {
          "code-samples": [
            {
              "name": "Typescript (SDK)",
              "language": "javascript",
              "code": "import { Wistia } from \"@wistia/wistia-api-client\";\n\nconst wistia = new Wistia({\n  bearerAuth: process.env[\"WISTIA_BEARER_AUTH\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await wistia.subfolders.delete({\n    folderId: \"abc123def4\",\n    subfolderId: \"xyz789ghi0\",\n  });\n\n  console.log(result);\n}\n\nrun();"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "javascript",
      "shell",
      "node",
      "python",
      "ruby"
    ]
  }
}
````