# Moderate a live session

`POST https://api.morevoice.ai/v1/conference_rooms/{id}/moderate`

Acts on the session in progress (409 when nobody is in the room): mute, hold, promote or remove a participant (`participant_id` from GET …/live), lock or unlock the room, mute everyone but the moderators, or end the session. Returns the live view after the change. Needs a live key.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `conference_rooms_moderate`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A conference room ID (`room_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `Idempotency-Key` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |

## Request body

Optional, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `end` | `true` | no | End the session for everyone. One of `true`. |
| `hold` | `boolean` | no | — |
| `lock` | `boolean` | no | Lock (true) or unlock the room: when locked nobody else can join. |
| `mute` | `boolean` | no | — |
| `mute_all` | `true` | no | Mute everyone except the moderators. One of `true`. |
| `participant_id` | `string` | no | The participant to act on (from GET …/live). |
| `remove` | `true` | no | Remove the participant from the room. One of `true`. |
| `role` | `"moderator" \| "member"` | no | — |

Example:

```json
{
  "mute": true,
  "participant_id": "g7Hk2pQx"
}
```

## Responses

### 200 OK

OK Returns `ConferenceLive`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"conference_live"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `room_id` | `string` | A conference room ID (prefix `room_`). |
| `active` | `boolean` | A session is in progress. |
| `session_id` | `string \| null` | `call_…` ID. |
| `started_at` | `string \| null` | — |
| `locked` | `boolean` | — |
| `recording` | `boolean` | — |
| `participants` | `object[]` | — |

Example:

```json
{
  "active": true,
  "livemode": true,
  "locked": false,
  "object": "conference_live",
  "participants": [
    {
      "held": false,
      "joined_at": "2026-11-03T08:01:10.000Z",
      "kind": "guest",
      "muted": false,
      "name": "Dana",
      "participant_id": "g7Hk2pQx",
      "phone": null,
      "role": "member",
      "state": "connected",
      "talking": false,
      "user_id": null
    }
  ],
  "recording": true,
  "room_id": "room_2dXk9QmZ4rTv",
  "session_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
  "started_at": "2026-11-03T08:00:40.000Z"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const conferenceLive = await mv.conferenceRooms.moderate("room_7Hk2Lm9Qp", {
	mute: true,
	participant_id: "g7Hk2pQx",
});
console.log(conferenceLive);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

conference_live = client.conference_rooms.moderate("room_7Hk2Lm9Qp", {
    "mute": True,
    "participant_id": "g7Hk2pQx",
})
print(conference_live)
```

**cURL**

```sh
curl -X POST https://api.morevoice.ai/v1/conference_rooms/room_7Hk2Lm9Qp/moderate \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "mute": true,
  "participant_id": "g7Hk2pQx"
}'
```
