---
title: "List outbound rules"
method: GET
path: "/outbound_rules"
tags: ["Outbound Rule"]
---

# List outbound rules

`GET /outbound_rules`

## Request

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

Retrieve a collection of outbound 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: The name of outbound rule.
    - `number_prefix` string: Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
    - `number_length` string: 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.
    - `number_mask` string: 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.
    - `enabled` boolean: Whether to enable outbound rule.
    - `priority` integer: The priority of outbound rule.
    - `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 holidays.
      - `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.
    - `routing_strategy` 'PRIORITIZED' | 'RANDOMLY': Routing strategy: Can be either: - `PRIORITIZED`: Selected according to the priority order of the route list. - `RANDOMLY`: Randomly select one of the route list.

## 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)
