Inbound Rules
Manage your inbound rules.
Export a collection of extension users to a CSV file. The exported data includes the enable_cc and enable_advanced module assignment fields so that the assignments can be preserved when the file is imported again.
OK
Error
GET /api/users/export HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binaryRetrieve 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
Total number of resource.
100Error
GET /api/inbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1,
"items": [
{
"id": "xxxxxx",
"name": "example",
"enabled": true,
"usage": "SIP",
"cid_number_mask": "",
"did_numbers": "1000",
"office_hours_forward_rule": {
"action": "HANGUP"
},
"non_office_hours_forward_rule": {
"action": "HANGUP"
},
"holiday_forward_rule": {
"action": "HANGUP"
},
"office_hours": {
"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": [],
"provider_id": "xxxxxx",
"enable_advanced_routing": false,
"advanced_routing": "",
"enable_audio_recording": 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 inbound rule usage, can be either:
BOTH: Applies to both messages and calls.SIP: Applies to calls only.MESSAGE: Applies to messages only.
BOTHPossible values: The 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.
A collection of ID of tenant's holiday.
NzAwNTUxOTA5NzczMTQ4MTYwNzAwNTUxOTA5NzczMTQ4MTYwWhether to enable advanced routing.
falseAdvanced routing rules.
Whether to enable audio recording.
falseCreated
NzAwNTUxOTA5NzczMTQ4MTYwError
POST /api/inbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 847
{
"name": "example",
"enabled": true,
"usage": "SIP",
"cid_number_mask": "",
"did_numbers": "1000",
"office_hours_forward_rule": {
"action": "HANGUP"
},
"non_office_hours_forward_rule": {
"action": "HANGUP"
},
"holiday_forward_rule": {
"action": "HANGUP"
},
"office_hours": {
"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": [],
"provider_id": "xxxxxx",
"enable_advanced_routing": true,
"advanced_routing": "",
"enable_audio_recording": false
}{
"id": "xxxxxxxx"
}Retrieve an inbound rule.
NzAwNTUxOTA5NzczMTQ4MTYwOK
NzAwNTUxOTA5NzczMTQ4MTYwInbound rule name.
Enabled or not.
trueThe inbound rule usage, can be either:
BOTH: Applies to both messages and calls.SIP: Applies to calls only.MESSAGE: Applies to messages only.
BOTHPossible values: The 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.
NzAwNTUxOTA5NzczMTQ4MTYwWhether to enable advanced routing.
falseAdvanced routing rules.
Whether to enable audio recording.
falseError
GET /api/inbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "xxxxxx",
"name": "example",
"enabled": true,
"usage": "SIP",
"cid_number_mask": "",
"did_numbers": "1000",
"office_hours_forward_rule": {
"action": "HANGUP"
},
"non_office_hours_forward_rule": {
"action": "HANGUP"
},
"holiday_forward_rule": {
"action": "HANGUP"
},
"office_hours": {
"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": [],
"provider_id": "xxxxxx",
"enable_advanced_routing": true,
"advanced_routing": "",
"enable_audio_recording": false
}Update an inbound rule.
NzAwNTUxOTA5NzczMTQ4MTYwInbound rule name.
Enabled or not.
trueThe inbound rule usage, can be either:
BOTH: Applies to both messages and calls.SIP: Applies to calls only.MESSAGE: Applies to messages only.
BOTHPossible values: The 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.
A collection of ID of tenant's holiday.
NzAwNTUxOTA5NzczMTQ4MTYwNzAwNTUxOTA5NzczMTQ4MTYwWhether to enable advanced routing.
falseAdvanced routing rules.
Whether to enable audio recording.
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: 847
{
"name": "example",
"enabled": true,
"usage": "SIP",
"cid_number_mask": "",
"did_numbers": "1000",
"office_hours_forward_rule": {
"action": "HANGUP"
},
"non_office_hours_forward_rule": {
"action": "HANGUP"
},
"holiday_forward_rule": {
"action": "HANGUP"
},
"office_hours": {
"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": [],
"provider_id": "xxxxxx",
"enable_advanced_routing": true,
"advanced_routing": "",
"enable_audio_recording": false
}No content
Destroy an inbound rule.
NzAwNTUxOTA5NzczMTQ4MTYwNo Content
No content
Invalid inbound rule ID supplied
POST /api/inbound_rules/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Export a collection of inbound rules to file.
OK
Error
GET /api/inbound_rules/export HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binaryLast updated
Was this helpful?