# Clear a relationship

> Removes your follow or hide of a User.

`DELETE /relationships/{username}` on `https://api.mediux.io`

Works by username for any User, including one who is now banned or hidden. Clearing a relationship that does not exist, or naming an unknown or stale username, is a `204` no-op. Usernames can change, and a freed username can be taken by another User: store the target's `id` and re-read its current `username` (from `GET /relationships` or the profile) before writing.

## Authorization

OAuth 2 bearer token in the `Authorization` header. Required permission: `relationships:manage`.

## Parameters

- `username` (path, string, required): The username of the User to follow, hide or clear, in any letter case.

## Responses

### 204

The relationship is cleared; no body.

### 400

The request is malformed or failed validation. Inspect `error.code` and `error.issues`.

### 401

The access token is missing (`auth.required`), or invalid, expired or revoked (`auth.invalidToken`).

### 403

The token lacks the required App Permission (`auth.insufficientScope`, with `details.required`), or the account or connection may not do this (`auth.forbidden`).

### 429

Too many requests. Wait the `Retry-After` seconds before trying again.

### 503

Temporarily unavailable. Check the outcome before retrying a write.

## Clearing by username

The path holds the target's username in any letter case. The route works for
any user holding that username, including one who has since been banned or
hidden. It answers `204` with no body, also when there was no relationship to
clear or no user holds the username: a stale name is a no-op. Usernames can
change and a freed name can be taken by another user, so store the `id` and
read the current username from the row's `target.username` in
`GET /relationships` before clearing.
