Outbound rules
Manage your outbound rules.
Retrieve a collection of outbound 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/outbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 100,
"items": [
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"number_prefix": "text",
"number_length": "text",
"number_mask": "text",
"enabled": true,
"priority": 1000,
"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
}
],
"routing_strategy": "PRIORITIZED"
}
]
}Add a new outbound rule.
The name of outbound rule.
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
The length of number prefix.
A semicolon-separated list of integer.
For example by specifying "1;2", calls with a caller ID of 1 or 2 digits will be applied this rule.
Extension who starts the call. A semicolon-separated list of extensions allowed. For example by specifying "101-110;199", extensions from 101 to 110 and 199 will be applied this rule.
Whether to enable outbound rule.
trueThe priority of outbound rule.
1000Routing strategy:
Can be either:
PRIORITIZED: Selected according to the priority order of the route list.RANDOMLY: Randomly select one of the route list.
PRIORITIZEDPossible values: Created outbound rule
Error
POST /api/outbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 827
{
"name": "text",
"number_prefix": "text",
"number_length": "text",
"number_mask": "text",
"enabled": true,
"priority": 1000,
"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"
],
"routing_strategy": "PRIORITIZED",
"routes": [
{
"enabled": true,
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"strip_digits": 0,
"prepend": "text",
"outbound_caller_id": "text"
}
]
}{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwOK
Error
GET /api/outbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"number_prefix": "text",
"number_length": "text",
"number_mask": "text",
"enabled": true,
"priority": 1000,
"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
}
],
"routing_strategy": "PRIORITIZED",
"routes": [
{
"enabled": true,
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"strip_digits": 0,
"prepend": "text",
"outbound_caller_id": "text"
}
]
}Update properties of outbound rule by it's unique ID.
The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwThe unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwThe name of outbound rule.
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
The length of number prefix.
A semicolon-separated list of integer.
For example by specifying "1;2", calls with a caller ID of 1 or 2 digits will be applied this rule.
Extension who starts the call. A semicolon-separated list of extensions allowed. For example by specifying "101-110;199", extensions from 101 to 110 and 199 will be applied this rule.
Whether to enable outbound rule.
trueThe priority of outbound rule.
1000Routing strategy:
Can be either:
PRIORITIZED: Selected according to the priority order of the route list.RANDOMLY: Randomly select one of the route list.
PRIORITIZEDPossible values: OK
No content
Error
POST /api/outbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 859
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"number_prefix": "text",
"number_length": "text",
"number_mask": "text",
"enabled": true,
"priority": 1000,
"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"
],
"routing_strategy": "PRIORITIZED",
"routes": [
{
"enabled": true,
"provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"strip_digits": 0,
"prepend": "text",
"outbound_caller_id": "text"
}
]
}No content
The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwNo Content
Error
POST /api/outbound_rules/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Export a collection of outbound rules to file.
OK
Error
GET /api/outbound_rules/export HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binaryRetrieve a collection of user groups applied to outbound rule.
The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwOK
Error
GET /api/outbound_rules/{id}/applied_groups HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"description": "text"
}
]
}Check if a group has outbound rule applied.
The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwThe unique ID of user group.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwOK
Not Found
GET /api/outbound_rules/{id}/applied_groups/{group_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "NzAwNTUxOTA5NzczMTQ4MTYw",
"name": "text",
"description": "text"
}Apply a group to outbound rule.
The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwThe unique ID of user group.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwOK
No content
Error
POST /api/outbound_rules/{id}/applied_groups/{group_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Cancel group applied outbound rule.
The unique ID of outbound rule.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwThe unique ID of user group.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwNo Content
Error
POST /api/outbound_rules/{id}/applied_groups/{group_id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated