Inbound rules
Retrieve a collection of inbound rules
Use the filter query parameter to retrieve just a subset of a collection.
Use the search query parameter to restrict the results of a request to match a search criterion.
Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.
Use the skip query parameter to set the number of items to skip at the start of a collection.
0Use the top query parameter to specify the page size of the result set.
100OK
Error
GET /api/inbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 100,
"items": [
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"enabled": true,
"cid_number_mask": "text",
"did_numbers": "text",
"office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"non_office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"holiday_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"office_hours": {
"mode": "CUSTOM",
"monday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"tuesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"wednesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"thursday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"friday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"saturday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"sunday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
}
},
"holidays": [
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"every_year": true,
"consecutive": true,
"year_start": 1,
"year_end": 1,
"month_start": 1,
"month_end": 1,
"day_start": 1,
"day_end": 1,
"hour_start": 1,
"hour_end": 1,
"minute_start": 1,
"minute_end": 1
}
],
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"enable_advanced_routing": false,
"advanced_routing": "text",
"play_recording_disclaimer": false
}
]
}Add a new inbound rule. Please make sure you have at least one provider created before creating a new inbound rule.
Inbound rule name.
Enabled or not.
trueThe CID number Mask for inbound rule.
You can add the number in it's entirety, identifying a single caller,
or use the * as a wildcard. For example 0044********** will identify a
UK Caller and 004420******** will identify a caller from London.
Note: the * digits must matched number actually digits. If the number is 3 digits, then should use ***
The CID number mask also allow set a number range, for example: 00442012345670-00442012345680.
A single DID/DDI number or a hyphen-separated range of DID/DDI numbers.
The unique ID of trunk.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwWhether to enable advanced routing.
falseAdvanced routing rules.
Whether to play recording disclaimer to inbound calls.
falseCreated
Error
POST /api/inbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 983
{
"name": "text",
"enabled": true,
"cid_number_mask": "text",
"did_numbers": "text",
"office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"non_office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"holiday_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"office_hours": {
"mode": "CUSTOM",
"monday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"tuesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"wednesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"thursday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"friday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"saturday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"sunday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
}
},
"holidays": [
"NzAwNTUxOTA5NzczMTQ4MTYw"
],
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"enable_advanced_routing": false,
"advanced_routing": "text",
"play_recording_disclaimer": false
}{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}Retrieve an inbound rule.
The unique ID of inbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwOK
Error
GET /api/inbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"enabled": true,
"cid_number_mask": "text",
"did_numbers": "text",
"office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"non_office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"holiday_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"office_hours": {
"mode": "CUSTOM",
"monday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"tuesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"wednesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"thursday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"friday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"saturday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"sunday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
}
},
"holidays": [
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"every_year": true,
"consecutive": true,
"year_start": 1,
"year_end": 1,
"month_start": 1,
"month_end": 1,
"day_start": 1,
"day_end": 1,
"hour_start": 1,
"hour_end": 1,
"minute_start": 1,
"minute_end": 1
}
],
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"enable_advanced_routing": false,
"advanced_routing": "text",
"play_recording_disclaimer": false
}Update an inbound rule.
The unique ID of inbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwInbound rule name.
Enabled or not.
trueThe CID number Mask for inbound rule.
You can add the number in it's entirety, identifying a single caller,
or use the * as a wildcard. For example 0044********** will identify a
UK Caller and 004420******** will identify a caller from London.
Note: the * digits must matched number actually digits. If the number is 3 digits, then should use ***
The CID number mask also allow set a number range, for example: 00442012345670-00442012345680.
A single DID/DDI number or a hyphen-separated range of DID/DDI numbers.
The unique ID of trunk.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwWhether to enable advanced routing.
falseAdvanced routing rules.
Whether to play recording disclaimer to inbound calls.
falseOK
No content
Error
POST /api/inbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 983
{
"name": "text",
"enabled": true,
"cid_number_mask": "text",
"did_numbers": "text",
"office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"non_office_hours_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"holiday_forward_rule": {
"action": "FORWARD_TO_NUMBER",
"number": "text"
},
"office_hours": {
"mode": "CUSTOM",
"monday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"tuesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"wednesday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"thursday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"friday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"saturday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
},
"sunday": {
"enabled": true,
"ranges": [
{
"from": "09:00",
"to": "17:00"
}
]
}
},
"holidays": [
"NzAwNTUxOTA5NzczMTQ4MTYw"
],
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"enable_advanced_routing": false,
"advanced_routing": "text",
"play_recording_disclaimer": false
}No content