Retrive inbound rules

GET /inbound_rules/list
Retrive a list of inbound 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/inbound_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

    Collection of inbound rule objects.
    Show child attributes

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_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • name

    string

    required

    Name of inbound rule.

Sample Request

https://example.com/api/inbound_rules/show?access_token=196ACE20C6F34027895F7F95402BB164&name=rule+name+1

Response

Placeholders
  • name

    string

    required

    Name of inbound rule.
  • enabled

    boolean

    required

    Enabled or not.
  • type

    string

    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_mask

    string

    required

    Mask number for inbound rule.
  • providers

    array

    required

    Indicates the configured providers that the inbound rule will be applied to.
  • office_hours_action

    string

    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_value

    string

    required

    Action taken for incoming call during office hours.
  • outside_office_hours

    string

    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_value

    string

    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_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • name

    string

    required

    Name of inbound rule.
  • enabled

    boolean

    required

    Enabled or not.
  • type

    string

    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_mask

    string

    required

    Mask number for inbound rule.
  • providers

    array

    required

    Indicates the configured providers that the inbound rule will be applied to.
  • office_hours_action

    string

    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_value

    string

    required

    Action taken for incoming call during office hours.
  • outside_office_hours

    string

    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_value

    string

    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_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • name

    string

    required

    Name of inbound rule.
  • enabled

    boolean

    required

    Enabled or not.
  • type

    string

    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_mask

    string

    required

    Mask number for inbound rule.
  • providers

    array

    required

    Indicates the configured providers that the inbound rule will be applied to.
  • office_hours_action

    string

    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_value

    string

    required

    Action taken for incoming call during office hours.
  • outside_office_hours

    string

    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_value

    string

    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_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • name

    string

    required

    Name of inbound rule to be deleted.

Sample Request

{
    "access_token": "196ACE20C6F34027895F7F95402BB164",
    "name": "inbound rule name 1"
}

Response

Placeholders

Sample Response