# End a Call

Use the `POST /calls/end/` endpoint to terminate an active call session. Simply provide the unique `room_id`to close the call between the car owner and the mechanic.

***

**Parameters**

| Name       | Type   | Description                           |
| ---------- | ------ | ------------------------------------- |
| room\_id\* | string | Unique ID of the call room (Required) |

**Example Request**:

```bash
curl -X POST "https://requestnowmechanic.com/v1/calls/end/" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "room_id": "room123"
  }'
```

***

#### Headers

| Name          | Value                   |
| ------------- | ----------------------- |
| Content-Type  | `application/json`      |
| Authorization | `Bearer {access_token}` |

**Response**

**Status Code**: `201 Created`

**Description**: The call session was successfully ended.

**Response Fields**:

<table><thead><tr><th width="115">Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>room_id</td><td>string</td><td>Confirms the ID of the room that was ended.</td></tr><tr><td>message</td><td>string</td><td>Provides a success message.</td></tr></tbody></table>

**Example Response**:

```json
{
  "message": "Call ended successfully",
  "room_id": "room123"
}
```

***

**Error Response**

* **Status Code**: `400 Bad Request` or `401 Unauthorized`
