---
agentTools:
  projectIndex: https://seafile-api.readme.io/llms.txt
---

# Delete dir

Delete the current repo directory

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Via Repo-Token",
    "description": "Access library Via Repo-Token",
    "version": "13.0"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seafile.com"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication).",
        "bearerFormat": "Account-Token"
      }
    },
    "parameters": {
      "dir_path": {
        "name": "path",
        "in": "query",
        "description": "Path to the dir",
        "required": true,
        "schema": {
          "type": "string",
          "default": "/"
        },
        "example": "/folder"
      }
    }
  },
  "paths": {
    "/api/v2.1/via-repo-token/dir/": {
      "delete": {
        "summary": "Delete dir",
        "tags": [
          "Dir / Files"
        ],
        "description": "Delete the current repo directory",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/dir_path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Success info",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "commit_id": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "commit_id": "574eaa90fbf8c279735a1350253b43824e8904d1"
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 183,
      "2": 248,
      "3": 230,
      "4": 103,
      "5": 20,
      "6": 160,
      "7": 0,
      "8": 41,
      "9": 50,
      "10": 176,
      "11": 74
    }
  }
}
```