# Subscribe to or leave a Public List

> Subscribes the user to another User's Public List, or ends the subscription.

`PUT /account/lists/{id}/subscription` on `https://api.mediux.io`

`changed` is `false` when the user was already in the requested state. A user can't subscribe to their own Public List (`409` `list.subscriptionInvalid`); a private or unknown List is `404` `list.notFound`. A user can follow 500 Lists (`409` `list.limit.subscriptions`). Subscriber counts on the public routes refresh hourly.

## Authorization

OAuth 2 bearer token in the `Authorization` header. Required permission: `lists:write`.

## Parameters

- `id` (path, string, required): The List's ID (a lowercase UUID). A List the user neither owns nor subscribes to, or a malformed ID, is `404` `list.notFound`.

## Request body (`application/json`)

- `subscribed` (boolean, required)

## Responses

### 200

The subscription now in place.

- `data` (object, required)
  - `subscribed` (boolean, required)
  - `changed` (boolean, required)
  - `subscriberCount` (integer, required)

### 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`).

### 404

The resource does not exist or is not the user's.

### 409

The request conflicts with current state or a limit. Inspect `error.code` and `error.details`.

### 413

The body exceeds the allowed size.

### 415

The `Content-Type` is not `application/json`.

### 429

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

### 503

Temporarily unavailable. Check the outcome before retrying a write.

## Example response (200)

```json
{
  "data": {
    "subscribed": true,
    "changed": true,
    "subscriberCount": 0
  }
}
```
