# Ban someone

`POST https://rest.wordplus.cloud/wordplus/realtime/calls/{name}/ban`

Takes someone out of a group call and keeps them out, whatever token they bring, for `minutes`, or until the call
ends with none. Their join is refused `banned`. A host is never banned (`forbidden`). The call screen's Ban.

In the packages: `realtime.call( name ).ban( user, { minutes?, by? } )`.

## Parameters

| Name | In | |
|---|---|---|
| `name` (required) | path | The group call name, percent-encoded: `meeting:7` is `meeting%3A7`. |

## Request

```json
{
  "user": "43",
  "minutes": 60
}
```

## Answer

Whether they were in it, and until when the ban holds, in milliseconds, null until the call ends.

```json
{
  "ok": true,
  "removed": true,
  "until": 1791642000000
}
```

## 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/calls/meeting%3A7/ban' '{"user":"43","minutes":60}'
```

**Node**

```js
const { until } = await wordplus('POST', `/wordplus/realtime/calls/${encodeURIComponent('meeting:7')}/ban`, { user: '43', minutes: 60 });
```

**Python**

```python
until = wordplus("POST", f"/wordplus/realtime/calls/{quote('meeting:7', safe='')}/ban", {"user": "43", "minutes": 60})["until"]
```

**PHP**

```php
$until = wordplus('POST', '/wordplus/realtime/calls/'.rawurlencode('meeting:7').'/ban', ['user' => '43', 'minutes' => 60])['until'];
```

**Go**

```go
answer, err := app.Request("POST", "/wordplus/realtime/calls/"+url.PathEscape("meeting:7")+"/ban", map[string]any{"user": "43", "minutes": 60})
```

