Retrive inbound rules
GET
/inbound_rules/list
Retrive a list of inbound rules
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.paginationinteger
required
The pagination of paging.pagesizeinteger
optional
The pagesize of paging.sort_byenum
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/inbound_rules/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
paginationinteger
required
The pagination of paging.pagesizeinteger
optional
The pagesize of paging.sort_byenum
optional
Values include "DEFAULT" and "Optional" Default value will be used when user does not specify value for this field.page_countinteger
required
The total count of pages.countinteger
required
Current pagesize.rulesarray
required
Show child attributesCollection of inbound rule objects.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"rules": [
{
"type": "DID",
"name": "test",
"number_mask": "110-190"
}
]
}
Obtain settings of inbound rule
GET
/inbound_rules/show
Get the settings of an inbound rule.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.namestring
required
Name of inbound rule.
Sample Request
https://example.com/api/inbound_rules/show?access_token=196ACE20C6F34027895F7F95402BB164&name=rule+name+1
Response
Placeholders
namestring
required
Name of inbound rule.enabledboolean
required
Enabled or not.typestring
required
Values include DID or CID.
If it is set to DID, inbound rule will be configured based on the callee ID.
If it is set to CID, inbound rule will be configured based on the caller ID.number_maskstring
required
Mask number for inbound rule.providersarray
required
Indicates the configured providers that the inbound rule will be applied to.office_hours_actionstring
required
Setup how calls should be directed during office hours for the inbound rule.
Values:
END_CALL – End the call;
CONNECT_TO_EXTENSION – Connect to extension;
CONNECT_TO_RING_GROUP – Connect to ring groups;
CONNECT_TO_VIRTUAL_RECEPTIONIST – Connect to virtual receptionist;
CONNECT_TO_VOICE_MAIL – Connect to voicemail;
CONNECT_TO_EXTERNAL_NUMBER – Connect to external number.
CONNECT_TO_CALL_QUEUE – Connect to Call Queue.office_hours_action_valuestring
required
Action taken for incoming call during office hours.outside_office_hoursstring
required
Setup how calls should be directed during non-office hours for the inbound rule.
Values:
END_CALL – End the call;
CONNECT_TO_EXTENSION – Connect to extension;
CONNECT_TO_RING_GROUP – Connect to ring groups;
CONNECT_TO_VIRTUAL_RECEPTIONIST – Connect to virtual receptionist;
CONNECT_TO_VOICE_MAIL – Connect to voicemail;
CONNECT_TO_EXTERNAL_NUMBER – Connect to external number.
CONNECT_TO_CALL_QUEUE – Connect to Call Queue.outside_office_hours_action_valuestring
required
Action taken for incoming call during non-office hours.
Sample Response
{
"name": "mytestrule",
"enabled": true,
"type": "DID",
"number_mask": "8659022",
"providers": [
"callcentric1",
"callcentric2"
],
"office_hours_action": "END_CALL",
"office_hours_action_value": "",
"outside_office_hours_action": "END_CALL",
"outside_office_hours_action_value": ""
}
Create an inbound rule
POST
/inbound_rules/create
Add a new inbound rule. Please make sure you have at least one provider created before creating a new inbound rule.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.namestring
required
Name of inbound rule.enabledboolean
required
Enabled or not.typestring
required
Values include DID or CID.
If it is set to DID, inbound rule will be configured based on the callee ID.
If it is set to CID, inbound rule will be configured based on the caller ID.number_maskstring
required
Mask number for inbound rule.providersarray
required
Indicates the configured providers that the inbound rule will be applied to.office_hours_actionstring
required
Setup how calls should be directed during office hours for the inbound rule.
Values:
END_CALL – End the call;
CONNECT_TO_EXTENSION – Connect to extension;
CONNECT_TO_RING_GROUP – Connect to ring groups;
CONNECT_TO_VIRTUAL_RECEPTIONIST – Connect to virtual receptionist;
CONNECT_TO_VOICE_MAIL – Connect to voicemail;
CONNECT_TO_EXTERNAL_NUMBER – Connect to external number.
CONNECT_TO_CALL_QUEUE – Connect to Call Queue.office_hours_action_valuestring
required
Action taken for incoming call during office hours.outside_office_hoursstring
required
Setup how calls should be directed during non-office hours for the inbound rule.
Values:
END_CALL – End the call;
CONNECT_TO_EXTENSION – Connect to extension;
CONNECT_TO_RING_GROUP – Connect to ring groups;
CONNECT_TO_VIRTUAL_RECEPTIONIST – Connect to virtual receptionist;
CONNECT_TO_VOICE_MAIL – Connect to voicemail;
CONNECT_TO_EXTERNAL_NUMBER – Connect to external number.
CONNECT_TO_CALL_QUEUE – Connect to Call Queue.outside_office_hours_action_valuestring
required
Action taken for incoming call during non-office hours.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"name": "mytestrule",
"enabled": true,
"type": "DID",
"number_mask": "8659022",
"providers": [
"callcentric1",
"callcentric2"
],
"office_hours_action": "END_CALL",
"office_hours_action_value": "",
"outside_office_hours_action": "END_CALL",
"outside_office_hours_action_value": ""
}
Response
Placeholders
Sample Response
Update inbound rule
POST
/inbound_rules/update
Modifies the settings of an inbound rule.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.namestring
required
Name of inbound rule.enabledboolean
required
Enabled or not.typestring
required
Values include DID or CID.
If it is set to DID, inbound rule will be configured based on the callee ID.
If it is set to CID, inbound rule will be configured based on the caller ID.number_maskstring
required
Mask number for inbound rule.providersarray
required
Indicates the configured providers that the inbound rule will be applied to.office_hours_actionstring
required
Setup how calls should be directed during office hours for the inbound rule.
Values:
END_CALL – End the call;
CONNECT_TO_EXTENSION – Connect to extension;
CONNECT_TO_RING_GROUP – Connect to ring groups;
CONNECT_TO_VIRTUAL_RECEPTIONIST – Connect to virtual receptionist;
CONNECT_TO_VOICE_MAIL – Connect to voicemail;
CONNECT_TO_EXTERNAL_NUMBER – Connect to external number.
CONNECT_TO_CALL_QUEUE – Connect to Call Queue.office_hours_action_valuestring
required
Action taken for incoming call during office hours.outside_office_hoursstring
required
Setup how calls should be directed during non-office hours for the inbound rule.
Values:
END_CALL – End the call;
CONNECT_TO_EXTENSION – Connect to extension;
CONNECT_TO_RING_GROUP – Connect to ring groups;
CONNECT_TO_VIRTUAL_RECEPTIONIST – Connect to virtual receptionist;
CONNECT_TO_VOICE_MAIL – Connect to voicemail;
CONNECT_TO_EXTERNAL_NUMBER – Connect to external number.
CONNECT_TO_CALL_QUEUE – Connect to Call Queue.outside_office_hours_action_valuestring
required
Action taken for incoming call during non-office hours.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"name": "mytestrule",
"enabled": true,
"type": "DID",
"number_mask": "8659022",
"providers": [
"callcentric1",
"callcentric2"
],
"office_hours_action": "END_CALL",
"office_hours_action_value": "",
"outside_office_hours_action": "END_CALL",
"outside_office_hours_action_value": ""
}
Response
Placeholders
Sample Response
Delete an inbound rule
POST
/inbound_rules/destroy
Delete a certain inbound rule.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.namestring
required
Name of inbound rule to be deleted.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"name": "inbound rule name 1"
}
Response
Placeholders