Create Webhook - API
Registers a new webhook for receiving real-time event notifications. Each webhook is tied to the authenticated user and can subscribe to multiple event types.
HTTP method and endpoint
POST
|
https://api.videosdk.live/v2/sip/webhooksHeaders Parameters
REQUIRED
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
The target URL where webhook events will be delivered.
REQUIRED
Array of event names to subscribe to. Allowed values:
call-started
, call-answered
, call-hangup
, call-transferred
, call-missed
, call-update
, call-ringing
. POST
|
https://api.videosdk.live/v2/sip/webhooks
NodeJS
import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url" : "https://example.com/webhook",
"events" : ["call-started","call-answered"]
}),
};
const url= `https://api.videosdk.live/v2/sip/webhooks`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"id": "wh_123456789",
"url": "https://example.com/webhook",
"events": [
"call-started",
"call-answered"
],
"createdAt": "2025-08-21T12:00:00.000Z",
"updatedAt": "2025-08-21T12:10:00.000Z"
}
Got a Question? Ask us on discord