Skip to main content
Version: /v2

Fetch All Routing Rules - API

Returns a paginated list of routing rules for the authenticated user.

Inbound entries include headersToAttributes; outbound entries include headers.

HTTP method and endpoint

GET

|

https://api.videosdk.live/v2/sip/routing-rule
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

Query Parameters
OPTIONAL
Page number for pagination. Defaults to 1.
OPTIONAL
Number of records per page. Defaults to 10.
OPTIONAL
Filter by rule direction. One of inbound, outbound.
OPTIONAL
Filter by specific rule IDs. Accepts a comma-separated string or repeated query params.
OPTIONAL
Filter by room dispatch type. One of static, dynamic. Accepts comma-separated or repeated.
Response Parameters
Pagination metadata — currentPage, perPage, lastPage, total.
Array of routing rules matching the filters.
GET
|
https://api.videosdk.live/v2/sip/routing-rule
import fetch from 'node-fetch';
const options = {
method: "GET",
headers: {
"Authorization": "$YOUR_TOKEN",
},
};
const url= `https://api.videosdk.live/v2/sip/routing-rule?page=1&perPage=10&search=&type=&ruleIds=&roomType=`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"pageInfo": {
"currentPage": 1,
"perPage": 10,
"lastPage": 1,
"total": 2
},
"data": [
{
"id": "rr_abc123",
"name": "Inbound support rule",
"type": "inbound",
"numbers": [
"+14155551234"
],
"room": {
"type": "dynamic",
"prefix": "blank",
"id": null,
"pin": null
},
"agentId": "agent_xyz",
"agentMetadata": {
"team": "support"
},
"hidePhoneNumber": true,
"tags": [
"support",
"v2"
],
"apiKey": "ak_resolved",
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"allowedNumbers": [],
"allowedIpAddresses": [],
"includeHeaders": "SIP_X_HEADERS",
"headersToAttributes": {
"X-Caller-Id": "callerId"
},
"createdAt": "2026-05-11T10:00:00.000Z",
"updatedAt": "2026-05-11T10:00:00.000Z"
},
{
"id": "rr_def456",
"name": "Outbound dial rule",
"type": "outbound",
"numbers": [
"+14155559999"
],
"room": {
"type": "dynamic",
"prefix": "blank",
"id": null,
"pin": null
},
"agentId": "agent_xyz",
"agentMetadata": {},
"hidePhoneNumber": true,
"tags": [
"outbound"
],
"apiKey": "ak_resolved",
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"allowedNumbers": [],
"allowedIpAddresses": [],
"includeHeaders": "NONE",
"headers": {
"X-Customer-Id": "cust_42"
},
"createdAt": "2026-05-11T10:00:00.000Z",
"updatedAt": "2026-05-11T10:00:00.000Z"
}
]
}

Got a Question? Ask us on discord