For the complete documentation index, see llms.txt. This page is also available as Markdown.

Outbound rules

Manage your outbound rules.

List outbound rules

get

Retrieve a collection of outbound rules.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
countinteger · int64Optional

Total number of resource.

Example: 100
get/outbound_rules
GET /api/outbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "name": "example",
      "number_prefix": "example",
      "number_length": "",
      "number_mask": "",
      "enabled": true,
      "priority": 1,
      "office_hours": {
        "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": [],
      "routing_strategy": "PRIORITIZED",
      "usage": "SIP",
      "enable_audio_recording": false,
      "extension_groups": [
        {
          "id": "xxxxxx",
          "name": "group 1",
          "description": "example"
        }
      ]
    }
  ]
}

Create a outbound rule

post

Add a new outbound rule.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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 · int32 · max: 1000000Optional

The priority of outbound rule.

Default: 1000
usagestring · enumOptional

The inbound rule usage, can be either:

  • BOTH: Applies to both messages and calls.
  • SIP: Applies to voice only.
  • MESSAGE: Applies to messages only.
Default: SIPPossible values:
holidaysstring[]Optional

A collection ID of tenant's holidays.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
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:
enable_audio_recordingbooleanOptional

Whether to enable audio recording.

Default: false
Responses
201

Created outbound rule

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
post/outbound_rules
POST /api/outbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 807

{
  "name": "example",
  "number_prefix": "example",
  "number_length": "",
  "number_mask": "",
  "enabled": true,
  "priority": 1,
  "office_hours": {
    "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": [],
  "routing_strategy": "PRIORITIZED",
  "routes": [
    {
      "enabled": true,
      "provider_id": "xxxxxx",
      "strip_digits": 0,
      "prepend": "0086",
      "outbound_caller_id": "1000"
    }
  ],
  "usage": "SIP",
  "enable_audio_recording": false
}
{
  "id": "xxxxxxxx"
}

Retrieve a outbound rule

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: 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 · int32 · max: 1000000Optional

The priority of outbound rule.

Default: 1000
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:
usagestring · enumOptional

The inbound rule usage, can be either:

  • BOTH: Applies to both messages and calls.
  • SIP: Applies to voice only.
  • MESSAGE: Applies to messages only.
Default: SIPPossible values:
enable_audio_recordingbooleanOptional

Whether to enable audio recording.

Default: false
get/outbound_rules/{id}
GET /api/outbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "name": "example",
  "number_prefix": "example",
  "number_length": "",
  "number_mask": "",
  "enabled": true,
  "priority": 1,
  "office_hours": {
    "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": [],
  "routing_strategy": "PRIORITIZED",
  "routes": [
    {
      "enabled": true,
      "provider_id": "xxxxxx",
      "strip_digits": 0,
      "prepend": "0086",
      "outbound_caller_id": "1000"
    }
  ],
  "usage": "SIP",
  "enable_audio_recording": false,
  "extension_groups": [
    {
      "id": "xxxxxx",
      "name": "group 1",
      "description": "example"
    }
  ]
}

Update a outbound rule

post

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

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
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 · int32 · max: 1000000Optional

The priority of outbound rule.

Default: 1000
holidaysstring[]Optional

A collection ID of tenant's holidays.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
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:
usagestring · enumOptional

The inbound rule usage, can be either:

  • BOTH: Applies to both messages and calls.
  • SIP: Applies to voice only.
  • MESSAGE: Applies to messages only.
Default: SIPPossible values:
enable_audio_recordingbooleanOptional

Whether to enable audio recording.

Default: false
Responses
200

OK

No content

post/outbound_rules/{id}
POST /api/outbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 807

{
  "name": "example",
  "number_prefix": "example",
  "number_length": "",
  "number_mask": "",
  "enabled": true,
  "priority": 1,
  "office_hours": {
    "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": [],
  "routing_strategy": "PRIORITIZED",
  "routes": [
    {
      "enabled": true,
      "provider_id": "xxxxxx",
      "strip_digits": 0,
      "prepend": "0086",
      "outbound_caller_id": "1000"
    }
  ],
  "usage": "SIP",
  "enable_audio_recording": false
}

No content

Delete a outbound rule

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/outbound_rules/{id}/destroy
POST /api/outbound_rules/{id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Export outbound rules

get

Export a collection of outbound rules to file.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/octet-stream
Responsestring · binary
get/outbound_rules/export
GET /api/outbound_rules/export HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary

List applied groups of outbound rule

get

Retrieve a collection of user groups applied to outbound rule.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
get/outbound_rules/{id}/applied_groups
GET /api/outbound_rules/{id}/applied_groups HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "items": [
    {
      "id": "xxxxxx",
      "name": "example",
      "description": ""
    }
  ]
}

Check if a group has outbound rule applied

get

Check if a group has outbound rule applied.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
group_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

application/json
idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
namestring · min: 1 · max: 64Optional

The name of user group.

descriptionstring · max: 1024Optional

The description of user group.

get/outbound_rules/{id}/applied_groups/{group_id}
GET /api/outbound_rules/{id}/applied_groups/{group_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "name": "example",
  "description": ""
}

Apply group to outbound rule

post

Apply a group to outbound rule.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
group_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
200

OK

No content

post/outbound_rules/{id}/applied_groups/{group_id}
POST /api/outbound_rules/{id}/applied_groups/{group_id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Cancel group applied outbound rule

post

Cancel group applied outbound rule.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
group_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Responses
204

No Content

No content

post/outbound_rules/{id}/applied_groups/{group_id}/destroy
POST /api/outbound_rules/{id}/applied_groups/{group_id}/destroy HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?