curl --request POST \
--url https://api.zeroruntime.ai/v2/sip/routing-rule \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Support inbound",
"type": "inbound",
"phoneNumbers": [
"+14155550100"
],
"agentId": "ag_7f2c91",
"agentMetadata": {
"queue": "billing"
},
"room": {
"type": "dynamic",
"prefix": "sipNumber"
},
"includeHeaders": "SIP_X_HEADERS",
"headersToAttributes": {
"X-Customer-Id": "customerId"
},
"allowedNumbers": [],
"allowedIpAddresses": [],
"tags": [
"support"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}
'{
"id": "rr_8k2m1x",
"type": "inbound",
"numbers": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"phoneNumbers": [
"<string>"
],
"apiKey": "<string>",
"agentId": "<string>",
"agentMetadata": {},
"room": {
"type": "dynamic",
"prefix": "blank"
},
"includeHeaders": "NONE",
"headers": {},
"headersToAttributes": {},
"allowedNumbers": [
"<string>"
],
"allowedIpAddresses": [
"<string>"
],
"tags": [
"<string>"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}{
"message": "<string>"
}Routing rules
Create routing rule
Creates a routing rule and attaches it to the numbers in phoneNumbers. Only name and type are required.
POST
/
v2
/
sip
/
routing-rule
curl --request POST \
--url https://api.zeroruntime.ai/v2/sip/routing-rule \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Support inbound",
"type": "inbound",
"phoneNumbers": [
"+14155550100"
],
"agentId": "ag_7f2c91",
"agentMetadata": {
"queue": "billing"
},
"room": {
"type": "dynamic",
"prefix": "sipNumber"
},
"includeHeaders": "SIP_X_HEADERS",
"headersToAttributes": {
"X-Customer-Id": "customerId"
},
"allowedNumbers": [],
"allowedIpAddresses": [],
"tags": [
"support"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}
'{
"id": "rr_8k2m1x",
"type": "inbound",
"numbers": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"phoneNumbers": [
"<string>"
],
"apiKey": "<string>",
"agentId": "<string>",
"agentMetadata": {},
"room": {
"type": "dynamic",
"prefix": "blank"
},
"includeHeaders": "NONE",
"headers": {},
"headersToAttributes": {},
"allowedNumbers": [
"<string>"
],
"allowedIpAddresses": [
"<string>"
],
"tags": [
"<string>"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}{
"message": "<string>"
}Authorizations
Body
application/json
Response
The created rule.