Inbound rules

List inbound rules

get

Retrieve a collection of inbound rules

Authorizations
Query parameters
filterstringOptional

Use the filter query parameter to retrieve just a subset of a collection.

searchstringOptional

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystringOptional

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32Optional

Use the skip query parameter to set the number of items to skip at the start of a collection.

Default: 0
topinteger · int32 · min: 1 · max: 100Optional

Use the top query parameter to specify the page size of the result set.

Default: 100
Responses
200
OK
application/json
get
GET /api/inbound_rules HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 100,
  "items": [
    {
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "name": "text",
      "enabled": true,
      "cid_number_mask": "text",
      "did_numbers": "text",
      "office_hours_forward_rule": {
        "action": "FORWARD_TO_NUMBER",
        "number": "text"
      },
      "non_office_hours_forward_rule": {
        "action": "FORWARD_TO_NUMBER",
        "number": "text"
      },
      "holiday_forward_rule": {
        "action": "FORWARD_TO_NUMBER",
        "number": "text"
      },
      "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
        }
      ],
      "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "enable_advanced_routing": false,
      "advanced_routing": "text",
      "play_recording_disclaimer": false
    }
  ]
}

Create an inbound rule

post

Add a new inbound rule. Please make sure you have at least one provider created before creating a new inbound rule.

Authorizations
Body
namestring · min: 1 · max: 64Required

Inbound rule name.

enabledbooleanOptional

Enabled or not.

Default: true
cid_number_maskstringOptional

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.

did_numbersstring · min: 1Required

A single DID/DDI number or a hyphen-separated range of DID/DDI numbers.

office_hoursall ofOptional
provider_idall ofRequired

The unique ID of trunk.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
enable_advanced_routingbooleanOptional

Whether to enable advanced routing.

Default: false
advanced_routingstringOptional

Advanced routing rules.

play_recording_disclaimerbooleanOptional

Whether to play recording disclaimer to inbound calls.

Default: false
Responses
201
Created
application/json
post
POST /api/inbound_rules HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 983

{
  "name": "text",
  "enabled": true,
  "cid_number_mask": "text",
  "did_numbers": "text",
  "office_hours_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "non_office_hours_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "holiday_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "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"
  ],
  "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "enable_advanced_routing": false,
  "advanced_routing": "text",
  "play_recording_disclaimer": false
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve an inbound rule

get

Retrieve an inbound rule.

Authorizations
Path parameters
idall ofRequired

The unique ID of inbound rule.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200
OK
application/json
get
GET /api/inbound_rules/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "name": "text",
  "enabled": true,
  "cid_number_mask": "text",
  "did_numbers": "text",
  "office_hours_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "non_office_hours_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "holiday_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "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
    }
  ],
  "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "enable_advanced_routing": false,
  "advanced_routing": "text",
  "play_recording_disclaimer": false
}

Update an inbound rule

post

Update an inbound rule.

Authorizations
Path parameters
idall ofRequired

The unique ID of inbound rule.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Body
namestring · min: 1 · max: 64Optional

Inbound rule name.

enabledbooleanOptional

Enabled or not.

Default: true
cid_number_maskstringOptional

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.

did_numbersstring · min: 1Optional

A single DID/DDI number or a hyphen-separated range of DID/DDI numbers.

office_hoursall ofOptional
provider_idall ofOptional

The unique ID of trunk.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
enable_advanced_routingbooleanOptional

Whether to enable advanced routing.

Default: false
advanced_routingstringOptional

Advanced routing rules.

play_recording_disclaimerbooleanOptional

Whether to play recording disclaimer to inbound calls.

Default: false
Responses
200
OK
post
POST /api/inbound_rules/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 983

{
  "name": "text",
  "enabled": true,
  "cid_number_mask": "text",
  "did_numbers": "text",
  "office_hours_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "non_office_hours_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "holiday_forward_rule": {
    "action": "FORWARD_TO_NUMBER",
    "number": "text"
  },
  "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"
  ],
  "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "enable_advanced_routing": false,
  "advanced_routing": "text",
  "play_recording_disclaimer": false
}

No content