# Erase the history of a room

`DELETE https://rest.wordplus.cloud/wordplus/realtime/rooms/{name}/history`

Erases one kept event by its id, or all of them.

In the packages: `realtime.in( room ).forget( id )`.

## Parameters

| Name | In | |
|---|---|---|
| `name` (required) | path | The room name, percent-encoded: `order:42` is `order%3A42`. |
| `id` | query | The id of one event. All of them without it. |

## Answer

Erased.

```json
{
  "ok": true,
  "deleted": 1
}
```

## 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/rooms/order%3A42/history'
```

**Node**

```js
const { deleted } = await wordplus('DELETE', `/wordplus/realtime/rooms/${encodeURIComponent('order:42')}/history`);
```

**Python**

```python
wordplus("DELETE", f"/wordplus/realtime/rooms/{quote('order:42', safe='')}/history")
```

**PHP**

```php
wordplus('DELETE', '/wordplus/realtime/rooms/'.rawurlencode('order:42').'/history');
```

**Go**

```go
answer, err := app.Request("DELETE", "/wordplus/realtime/rooms/"+url.PathEscape("order:42")+"/history", nil)
```

