# end_call

Source: <https://everruns.com/docs/api/operations/end_call/>

POST

/v1/sessions/{session\_id}/voice/{voice\_connection\_id}/end

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/voice/example/end';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"reason":"User hung up after refund confirmed."}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/sessions/example/voice/example/end \
  --header 'Content-Type: application/json' \
  --data '{ "reason": "User hung up after refund confirmed." }'
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/voice/{voice\_connection\_id}/end

End a voice call.

## Parameters

### Path Parameters

**session\_id**

required

string

**voice\_connection\_id**

required

string

## Request Bodyrequired

Media typeapplication/json

Request body for ending a call.

object

**reason**

Free-text reason recorded with the session-ended event.

string | null

##### Example

```plaintext
User hung up after refund confirmed.
```

## Responses

### 200

Voice call ended

Media typeapplication/json

Response body for ending a call.

object

**status**

required

Current lifecycle status.

string

**voice\_connection\_id**

required

Prefixed public identifier of the voice connection that was ended.

string

##### Examplegenerated

```json
{
  "status": "example",
  "voice_connection_id": "example"
}
```