Skip to main content
Version: /v2

Call End - API

API to end an on going call.

HTTP method and endpoint

POST

|

https://api.videosdk.live/v2/sip/call/end
Headers Parameters

values : YOUR_TOKEN_WITHOUT_ANY_PREFIX

This will be a JWT token generate using VideoSDK ApiKey and Secret.

Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.

You can generate a new token by refering this Guide: Generate Auth token

REQUIRED

values : application/json

This is usefull for json body parameters, so that VideoSDK servers can understand that the incoming body parameter will be a JSON string.

Body Parameters
REQUIRED
ID of the call which has to be ended.
Response Parameters
Confirmation message about the call ended.
Unique ID of the call.
Current status of the call (e.g., INITIATED).
Room ID associated with the call.
Destination number of the call.
Source number of the call.
Gateway ID used for the call.
Custom metadata associated with the call.
Array of status change logs with timestamps.
POST
|
https://api.videosdk.live/v2/sip/call/end
import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"callId" : "712350ce-8fff-464d-b427-587bfb66636a"
}),
};
const url= `https://api.videosdk.live/v2/sip/call/end`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"message": "Call initiated successfully",
"data": {
"callId": "call_123456789",
"status": "ended",
"roomId": "room_123456",
"sipCallTo": "+14155550123",
"sipCallFrom": "+14155559876",
"gatewayId": "gw_123456789",
"metadata": {
"campaignId": "cmp_123",
"source": "crm"
},
"timelog": [
{
"status": "INITIATED",
"timestamp": "2025-08-21T11:45:00.000Z"
}
]
}
}

Got a Question? Ask us on discord