Retrieve outbound rules
GET
/outbound_rules/list
Retrieve a list of outbound rules.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
https://example.com/api/outbound_rules/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.page_count
integer
required
The total count of pages.count
integer
required
Current pagesize.rules
array
required
Show child attributesList of some outbound rules.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"rules": [
{
"name": "obd",
"enabled": true,
"number_prefix": "0021",
"number_length": 15,
"from_extension": "110-101,155",
"from_extension_groups": "DEFAULT",
"routes": [
{
"provider": "Sample provider 1",
"strip_digits": 1,
"prepend": "Sample prepend 1",
"blocked": false
},
{
"provider": "Sample provider 2",
"strip_digits": 1,
"prepend": "Sample prepend 2",
"blocked": false
},
{
"provider": "Sample provider 3",
"strip_digits": 1,
"prepend": "Sample prepend 3",
"blocked": false
}
]
}
]
}
Retrive settings of outbound rule
GET
/outbound_rules/show
Retrieves the settings of an outbound rule.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.name
string
required
Name of outbound rule to be obtained.
Sample Request
https://example.com/api/outbound_rules/show?access_token=196ACE20C6F34027895F7F95402BB164&name=rule+name
Response
Placeholders
name
string
required
Name of outbound rule.enabled
boolean
required
Enabled or not.number_prefix
string
required
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.number_length
integer
required
NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.from_extension
string
required
Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.from_extension_groups
array
required
Extensions number of the specific groups will be applied this rule.routes
array
required
Show child attributesPlaceholder
Sample Response
{
"name": "test",
"enabled": true,
"number_prefix": "99",
"number_length": 15,
"from_extension": "101",
"from_extension_groups": [
"DEFAULT"
],
"routes": [
{
"provider": "Sample provider 1",
"strip_digits": 1,
"prepend": "Sample prepend 1",
"blocked": false
},
{
"provider": "Sample provider 2",
"strip_digits": 1,
"prepend": "Sample prepend 2",
"blocked": false
},
{
"provider": "Sample provider 3",
"strip_digits": 1,
"prepend": "Sample prepend 3",
"blocked": false
}
]
}
Create an outbound rule
POST
/outbound_rules/create
Add a new outbound rule.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.name
string
required
Name of outbound rule.number_prefix
string
required
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.number_length
integer
required
NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.from_extension
string
required
Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.from_extension_groups
array
required
Extensions number of the specific groups will be applied this rule.routes
array
required
Show child attributesPlaceholder
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"name": "test",
"number_prefix": "9",
"number_length": 15,
"from_extension": "101",
"from_extension_groups": [
"DEFAULT"
],
"routes": [
{
"provider": "Sample provider 1",
"strip_digits": 1,
"prepend": "Sample prepend 1",
"blocked": false
},
{
"provider": "Sample provider 2",
"strip_digits": 1,
"prepend": "Sample prepend 2",
"blocked": false
},
{
"provider": "Sample provider 3",
"strip_digits": 1,
"prepend": "Sample prepend 3",
"blocked": false
}
]
}
Response
Placeholders
Sample Response
Update an outbound rule
POST
/outbound_rules/update
Modify the settings of an outbound rule.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.name
string
required
Name of outbound rule.enabled
boolean
required
Enabled or not.number_prefix
string
required
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.number_length
integer
required
NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.from_extension
string
required
Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.from_extension_groups
array
required
Extensions number of the specific groups will be applied this rule.routes
array
required
Show child attributesPlaceholder
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"name": "test",
"enabled": true,
"number_prefix": "99",
"number_length": 15,
"from_extension": "101",
"from_extension_groups": [
"DEFAULT"
],
"routes": [
{
"provider": "Sample provider 1",
"strip_digits": 1,
"prepend": "Sample prepend 1",
"blocked": false
},
{
"provider": "Sample provider 2",
"strip_digits": 1,
"prepend": "Sample prepend 2",
"blocked": false
},
{
"provider": "Sample provider 3",
"strip_digits": 1,
"prepend": "Sample prepend 3",
"blocked": false
}
]
}
Response
Placeholders
Sample Response
Remove an outbound rule
POST
/outbound_rules/destroy
Delete an outbound rule.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.name
string
required
Name of outbound rule to be deleted.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"name": "some rule name"
}
Response
Placeholders