# Lift a ban

`POST https://rest.wordplus.cloud/wordplus/realtime/streams/{name}/unban`

Lifts the ban of a person from a live stream: they may come back.

In the packages: `realtime.stream( name ).unban( user )`.

## Parameters

| Name | In | |
|---|---|---|
| `name` (required) | path | The stream name, percent-encoded: `show:mugs` is `show%3Amugs`. |

## Request

```json
{
  "user": "77"
}
```

## Answer

Whether there was a ban.

```json
{
  "ok": true,
  "lifted": true
}
```

## Refusals

- **400**: `bad_request`, `bad_room`: the request is not one the API takes. `reserved`: an event name kept for the room itself.
- **401**: `missing_signature`, `stale_signature` (a clock off by more than 5 minutes), `unknown_site`, `bad_signature` (a wrong secret, or a body or path other than the one signed).
- **403**: `not_included`: your plan does not include it.

## Examples

`wordplus()` (in Go `app.Request()`) signs and sends the request: https://docs.wordplus.cloud/api/signing/ has it in each language.

**curl**

```bash
wordplus POST '/wordplus/realtime/streams/show%3Amugs/unban' '{"user":"88"}'
```

**Node**

```js
const { lifted } = await wordplus('POST', `/wordplus/realtime/streams/${encodeURIComponent('show:mugs')}/unban`, { user: '88' });
```

**Python**

```python
lifted = wordplus("POST", f"/wordplus/realtime/streams/{quote('show:mugs', safe='')}/unban", {"user": "88"})["lifted"]
```

**PHP**

```php
$lifted = wordplus('POST', '/wordplus/realtime/streams/'.rawurlencode('show:mugs').'/unban', ['user' => '88'])['lifted'];
```

**Go**

```go
answer, err := app.Request("POST", "/wordplus/realtime/streams/"+url.PathEscape("show:mugs")+"/unban", map[string]any{"user": "88"})
```

