# PUT /api/v1/hosting/ftp

> List, create, delete or re-password FTP accounts

- Group: access
- Tier: W
- Required scope: read:hosting
- Docs: https://api.inleed.com/reference/access/update-ftp-accounts

## Description

`action=list` returns each account `{account, home, isSystem}` and needs only read access. `create` needs `account` and `password` (optional `path` for a custom home); `delete` needs `account`; `password` needs `account` and `password`. Those three require `write:hosting`. The main system account cannot be deleted or re-passworded here.

## Body

- `input` — string (required). A domain, email address, website URL, or Inleed service id — for example example.se, info@example.se or 42976. Resolved to the owning account automatically, and the resolved target is echoed back in the response.
- `action` — enum (required). list all accounts, create a new one, delete one, or password to change one's password. All but list require write:hosting. One of list, create, delete, password.
- `account` — string. The FTP account's local name (e.g. deploy) — not deploy@example.com.
- `password` — string. The new FTP password (min 8 chars). Required for create and password.
- `path` — string. Optional absolute home path for a create (e.g. /domains/example.com/public_html); defaults to the domain directory.

## Request

```bash
curl -X PUT "https://mcp.inleed.com/api/v1/hosting/ftp" \
  -H "Authorization: Bearer inl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"input":"example.se","action":"list","account":"example.se","password":"example.se","path":"example.se"}'
```

## Errors

- **400**  — codes: invalid_request
- **401** No token was presented, or the token is revoked, expired or unknown. — codes: unauthorized, token_expired, token_revoked
- **403** The token lacks a required scope, or this account does not own the resource. — codes: insufficient_scope, domain_not_owned
- **404** No such resource for this account. — codes: not_found
- **422** Validation error — codes: validation_failed, password_too_weak
- **429** The rate limit for this token is exhausted. See `Retry-After`. — codes: rate_limited
- **500** Something went wrong on our side. The failure is logged against `requestId`. — codes: internal_error

## Related

- GET /api/v1/hosting/ftp — https://api.inleed.com/reference/access/manage-ftp-accounts
- POST /api/v1/hosting/ftp — https://api.inleed.com/reference/access/create-ftp-accounts
- DELETE /api/v1/hosting/ftp — https://api.inleed.com/reference/access/delete-ftp-accounts

