---
title: "List inbound rules"
method: GET
path: "/inbound_rules"
tags: ["Inbound Rule"]
---

# List inbound rules

`GET /inbound_rules`

## Request

- Base URL: `https://HOSTNAME:8887/api`
- URL: `https://HOSTNAME:8887/api/inbound_rules`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/docs/inbound_rules/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a collection of inbound rules

## Query parameters

- `filter` string
- `search` string
- `orderby` string
- `skip` integer
- `top` integer

## Response `200`

OK

- object
  - `count` integer: Total number of resource.
  - `items` object[]
    - `id` string: The unique ID of the resource.
    - `name` string: Inbound rule name.
    - `enabled` boolean: Enabled or not.
    - `cid_number_mask` string: 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_numbers` string: A single DID/DDI number or a hyphen-separated range of DID/DDI numbers.
    - `office_hours_forward_rule` object
      - `action` 'FORWARD_TO_NUMBER' | 'FORWARD_TO_VOICEMAIL' | 'HANGUP': Forward action can be either: - `FORWARD_TO_NUMBER`: - `FORWARD_TO_VOICEMAIL`: - `HANGUP`: finish call
      - `number` string: Specify the forwarding destination number. Can be either: - Extension number: The extension number of PortSIP PBX. - External number: The numeric sequence of numbers, with or without a plus sign at the beginning.
    - `non_office_hours_forward_rule` object
      - `action` 'FORWARD_TO_NUMBER' | 'FORWARD_TO_VOICEMAIL' | 'HANGUP': Forward action can be either: - `FORWARD_TO_NUMBER`: - `FORWARD_TO_VOICEMAIL`: - `HANGUP`: finish call
      - `number` string: Specify the forwarding destination number. Can be either: - Extension number: The extension number of PortSIP PBX. - External number: The numeric sequence of numbers, with or without a plus sign at the beginning.
    - `holiday_forward_rule` object
      - `action` 'FORWARD_TO_NUMBER' | 'FORWARD_TO_VOICEMAIL' | 'HANGUP': Forward action can be either: - `FORWARD_TO_NUMBER`: - `FORWARD_TO_VOICEMAIL`: - `HANGUP`: finish call
      - `number` string: Specify the forwarding destination number. Can be either: - Extension number: The extension number of PortSIP PBX. - External number: The numeric sequence of numbers, with or without a plus sign at the beginning.
    - `office_hours` object
      - `mode` 'GLOBAL' | 'CUSTOM': The office hours mode can be either: - `GLOBAL`: Use global office hours. - `CUSTOM`: Use specific office hours.
      - `monday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
      - `tuesday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
      - `wednesday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
      - `thursday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
      - `friday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
      - `saturday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
      - `sunday` object
        - `enabled` boolean: When enabled, all day is working time, when disabled, all day is vacation time.
        - `ranges` object[]: Multiple start and end time periods make up the working time.
          - `from` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
          - `to` string: The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `holidays` object[]: A collection of tenant's holiday.
      - `id` string: The unique ID of the resource.
      - `name` string: The name of the holiday.
      - `every_year` boolean: Does the holiday take effect every year.
      - `consecutive` boolean: Whether the holiday consists of consecutive days.
      - `year_start` integer: The start year of holiday.
      - `year_end` integer: The end year of holiday.
      - `month_start` integer: The start month of holiday.
      - `month_end` integer: The end month of holiday.
      - `day_start` integer: The start day of holiday.
      - `day_end` integer: The end day of holiday.
      - `hour_start` integer: The start hour of holiday.
      - `hour_end` integer: The end hour of holiday.
      - `minute_start` integer: The start minute of holiday.
      - `minute_end` integer: The end minute of holiday.
    - `provider_id` string: The unique ID of the resource.
    - `enable_advanced_routing` boolean: Whether to enable advanced routing.
    - `advanced_routing` string: Advanced routing rules.
    - `play_recording_disclaimer` boolean: Whether to play recording disclaimer to inbound calls.

## Other responses

- `4XX`: Error

---

[API](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api.md) - [All operations](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/revisions/577415d4a3d5?raw)
