# End a supervision

`DELETE https://api.morevoice.ai/v1/calls/{id}/supervise/{supervision_id}`

The supervisor leaves the call now: the audio stops, the agent stops seeing them, and the browser's socket closes. Answers the ended supervision (also when it had already ended).

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

Operation ID: `calls_end_supervision`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A call ID (`call_…`). |
| `supervision_id` | `string` | yes | A supervision ID (`sup_…`). |

### 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. |

## Responses

### 200 OK

OK Returns `Supervision`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The supervision's ID. |
| `object` | `"supervision"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `call_id` | `string` | The call being supervised. |
| `mode` | `"listen" \| "whisper" \| "barge"` | `listen`: the supervisor hears both sides and nobody hears them. `whisper`: the agent hears the supervisor, the customer never does. `barge`: the supervisor joins the conversation and both hear them. |
| `status` | `"pending" \| "active" \| "reconnecting" \| "ended"` | `pending`: the browser has not joined yet. `active`: the supervisor is on the call. `reconnecting`: the browser's connection dropped; it rejoins in the same mode by itself (the supervision ends if it is not back within 30 seconds). `ended`: see `end_reason`. |
| `supervisor` | `object` | Who supervises. |
| `supervisor.user_id` | `string \| null` | The member who supervises (given as `user_id`, or the agent session's member). |
| `supervisor.agent_session_id` | `string \| null` | The agent session it was started for, or null. |
| `supervisor.name` | `string` | The name the agent sees and the audit trail records. |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `started_at` | `string \| null` | When the supervisor first joined the call. |
| `ended_at` | `string \| null` | — |
| `end_reason` | `"api" \| "left" \| "call_ended" \| "disconnected" \| "not_connected" \| "agent_session_ended" \| null` | Why it ended: `api` (DELETE), `left` (the browser left), `call_ended`, `disconnected` (the browser did not come back within 30 seconds), `not_connected` (nobody joined before the token expired), `agent_session_ended`. |

Example:

```json
{
  "call_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",
  "created": "2026-11-23T09:14:22.000Z",
  "end_reason": null,
  "ended_at": null,
  "id": "sup_4Kx9QmZ2rTnB7dWc3Lp8Hs",
  "livemode": true,
  "mode": "listen",
  "object": "supervision",
  "started_at": "2026-11-23T09:14:25.000Z",
  "status": "active",
  "supervisor": {
    "agent_session_id": null,
    "name": "Dana Levi",
    "user_id": "usr_5ZaH2Ld9QmPx3RtYk8BvNw"
  }
}
```

### 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 (in the path or the body) 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 supervision = await mv.calls.endSupervision("call_7Hk2Lm9Qp", "sup_7Hk2Lm9Qp");
console.log(supervision);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

supervision = client.calls.end_supervision("call_7Hk2Lm9Qp", "sup_7Hk2Lm9Qp")
print(supervision)
```

**cURL**

```sh
curl -X DELETE https://api.morevoice.ai/v1/calls/call_7Hk2Lm9Qp/supervise/sup_7Hk2Lm9Qp \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```
