Outbound rules

List outbound rules

get

Retrieve a collection of outbound 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/outbound_rules HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 100,
  "items": [
    {
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "name": "text",
      "number_prefix": "text",
      "number_length": "text",
      "number_mask": "text",
      "enabled": true,
      "priority": 1,
      "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
        }
      ],
      "routing_strategy": "PRIORITIZED"
    }
  ]
}

Create a outbound rule

post

Add a new outbound rule.

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

The name of outbound rule.

number_prefixstring · max: 64Optional

Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.

number_lengthstring · max: 64Optional

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_maskstringOptional

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.

enabledbooleanOptional

Whether to enable outbound rule.

Default: true
priorityinteger · int32Optional

The priority of outbound rule.

Default: 1000
office_hoursall ofOptional
routing_strategystring · enumOptional

Routing strategy:
Can be either:

  • PRIORITIZED: Selected according to the priority order of the route list.
  • RANDOMLY: Randomly select one of the route list.
Default: PRIORITIZEDPossible values:
Responses
201
Created outbound rule
application/json
post
POST /api/outbound_rules HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 824

{
  "name": "text",
  "number_prefix": "text",
  "number_length": "text",
  "number_mask": "text",
  "enabled": true,
  "priority": 1,
  "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"
  ],
  "routing_strategy": "PRIORITIZED",
  "routes": [
    {
      "enabled": true,
      "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "strip_digits": 1,
      "prepend": "text",
      "outbound_caller_id": "text"
    }
  ]
}
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve a outbound rule

get
Authorizations
Path parameters
idall ofRequired

The unique ID of outbound rule.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200
OK
application/json
get
GET /api/outbound_rules/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "name": "text",
  "number_prefix": "text",
  "number_length": "text",
  "number_mask": "text",
  "enabled": true,
  "priority": 1,
  "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
    }
  ],
  "routing_strategy": "PRIORITIZED",
  "routes": [
    {
      "enabled": true,
      "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "strip_digits": 1,
      "prepend": "text",
      "outbound_caller_id": "text"
    }
  ]
}

Update a outbound rule

post

Update properties of outbound rule by it's unique ID.

Authorizations
Path parameters
idall ofRequired

The unique ID of outbound rule.

stringOptional

The unique ID of the resource.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
Body
idall ofOptional

The unique ID of outbound rule.

stringOptional

The unique ID of the resource.

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

The name of outbound rule.

number_prefixstring · max: 64Optional

Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.

number_lengthstring · max: 64Optional

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_maskstringOptional

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.

enabledbooleanOptional

Whether to enable outbound rule.

Default: true
priorityinteger · int32Optional

The priority of outbound rule.

Default: 1000
office_hoursall ofOptional
routing_strategystring · enumOptional

Routing strategy:
Can be either:

  • PRIORITIZED: Selected according to the priority order of the route list.
  • RANDOMLY: Randomly select one of the route list.
Default: PRIORITIZEDPossible values:
Responses
200
OK
post
POST /api/outbound_rules/{id} HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 856

{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw",
  "name": "text",
  "number_prefix": "text",
  "number_length": "text",
  "number_mask": "text",
  "enabled": true,
  "priority": 1,
  "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"
  ],
  "routing_strategy": "PRIORITIZED",
  "routes": [
    {
      "enabled": true,
      "provider_id": "NzAwNTUxOTA5NzczMTQ4MTYw",
      "strip_digits": 1,
      "prepend": "text",
      "outbound_caller_id": "text"
    }
  ]
}

No content