# delete_files

> Delete a file or directory in a hosting account — irreversible, and deleting a directory removes everything under it.

- Tier: D
- Required scope: write:files
- Annotations: destructiveHint, idempotentHint
- Docs: https://api.inleed.com/tools/delete-files

## Description

Delete a file or directory in a hosting account — irreversible, and deleting a directory removes everything under it. This does not delete on this call: it confirms ownership and confines the `path`, then returns `{status:"confirmation_required", confirmationUrl, …}`. Show the human the `confirmationUrl` to approve in the client area; do not approve it yourself, then poll `get_pending_action`. `path` is relative to the account home and rejected if it contains `..`, a null byte or a shell character.

## Input schema

- `input` — string (required). A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.
- `path` — string (required). The file or directory to delete, relative to the account home (e.g. /domains/example.com/public_html/old.php).
- `attempt_key` — string. An idempotency key you choose. Reusing it within an hour returns the same held deletion instead of creating a second one.

## Example call

```json
{
  "name": "delete_files",
  "arguments": {
    "input": "example.se",
    "path": "example.se"
  }
}
```

