# Clear the chat

`DELETE https://rest.wordplus.cloud/wordplus/realtime/streams/{name}/chat`

Empties the chat of a live stream for everyone watching, the pinned message too.

In the packages: `realtime.stream( name ).clearChat()`.

## Parameters

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

## Answer

Done.

```json
{
  "ok": 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 DELETE '/wordplus/realtime/streams/show%3Amugs/chat'
```

**Node**

```js
await wordplus('DELETE', `/wordplus/realtime/streams/${encodeURIComponent('show:mugs')}/chat`);
```

**Python**

```python
wordplus("DELETE", f"/wordplus/realtime/streams/{quote('show:mugs', safe='')}/chat")
```

**PHP**

```php
wordplus('DELETE', '/wordplus/realtime/streams/'.rawurlencode('show:mugs').'/chat');
```

**Go**

```go
_, err := app.Request("DELETE", "/wordplus/realtime/streams/"+url.PathEscape("show:mugs")+"/chat", nil)
```

