Skip to main content
Version: /v2

Fetch Routing Rule by ID - API

Fetches a single routing rule by ruleId. Inbound rules return headersToAttributes; outbound rules return headers.

Responses:

  • 200 success.
  • 404 routing rule not found.
  • 500 internal server error.

HTTP method and endpoint

GET

|

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

Parameters
REQUIRED
The unique ID of the routing rule to retrieve.
Response Parameters
Unique identifier of the routing rule.
Name of the routing rule.
Rule direction — inbound or outbound.
Phone numbers attached to this rule.
Room dispatch object — { type, prefix, id, pin }.
ID of the dispatched agent, or null.
Metadata object forwarded to the agent.
Resolved API key string, if one was attached at create time.
Which SIP headers are surfaced — ALL, SIP_X_HEADERS, or NONE.
Inbound rules only — SIP header → attribute map.
Outbound rules only — custom SIP headers attached to outgoing INVITEs.
Allowlist of caller numbers.
Allowlist of caller IP addresses.
Tags applied to the rule.
Whether calls are recorded.
Whether DTMF events are captured.
Whether noise cancellation is enabled.
Whether the caller's number is hidden when dispatching.
Creation timestamp (ISO 8601).
Last-update timestamp (ISO 8601).
GET
|
https://api.videosdk.live/v2/sip/routing-rule/:ruleId
import fetch from 'node-fetch';
const options = {
method: "GET",
headers: {
"Authorization": "$YOUR_TOKEN",
},
};
const url= `https://api.videosdk.live/v2/sip/routing-rule/:ruleId`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"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"
}

Got a Question? Ask us on discord