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

Inbound Rules

Manage your inbound rules.

Export extension users

get

Export a collection of extension users to a CSV file. The exported data includes the enable_cc and enable_advanced module assignment fields so that the assignments can be preserved when the file is imported again.

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

OK

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

List inbound rules

get

Retrieve a collection of inbound 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/inbound_rules
GET /api/inbound_rules HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1,
  "items": [
    {
      "id": "xxxxxx",
      "name": "example",
      "enabled": true,
      "usage": "SIP",
      "cid_number_mask": "",
      "did_numbers": "1000",
      "office_hours_forward_rule": {
        "action": "HANGUP"
      },
      "non_office_hours_forward_rule": {
        "action": "HANGUP"
      },
      "holiday_forward_rule": {
        "action": "HANGUP"
      },
      "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": [],
      "provider_id": "xxxxxx",
      "enable_advanced_routing": false,
      "advanced_routing": "",
      "enable_audio_recording": 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
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestring · min: 1 · max: 64Required

Inbound rule name.

enabledbooleanOptional

Enabled or not.

Default: true
usagestring · enumOptional

The inbound rule usage, can be either:

  • BOTH: Applies to both messages and calls.
  • SIP: Applies to calls only.
  • MESSAGE: Applies to messages only.
Default: BOTHPossible values:
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.

holidaysstring[]Optional

A collection of ID of tenant's holiday.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
provider_idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
enable_advanced_routingbooleanOptional

Whether to enable advanced routing.

Default: false
advanced_routingstringOptional

Advanced routing rules.

enable_audio_recordingbooleanOptional

Whether to enable audio recording.

Default: false
Responses
201

Created

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

{
  "name": "example",
  "enabled": true,
  "usage": "SIP",
  "cid_number_mask": "",
  "did_numbers": "1000",
  "office_hours_forward_rule": {
    "action": "HANGUP"
  },
  "non_office_hours_forward_rule": {
    "action": "HANGUP"
  },
  "holiday_forward_rule": {
    "action": "HANGUP"
  },
  "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": [],
  "provider_id": "xxxxxx",
  "enable_advanced_routing": true,
  "advanced_routing": "",
  "enable_audio_recording": false
}
{
  "id": "xxxxxxxx"
}

Retrieve an inbound rule

get

Retrieve an inbound rule.

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

Inbound rule name.

enabledbooleanOptional

Enabled or not.

Default: true
usagestring · enumOptional

The inbound rule usage, can be either:

  • BOTH: Applies to both messages and calls.
  • SIP: Applies to calls only.
  • MESSAGE: Applies to messages only.
Default: BOTHPossible values:
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.

provider_idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
enable_advanced_routingbooleanOptional

Whether to enable advanced routing.

Default: false
advanced_routingstringOptional

Advanced routing rules.

enable_audio_recordingbooleanOptional

Whether to enable audio recording.

Default: false
get/inbound_rules/{id}
GET /api/inbound_rules/{id} HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "xxxxxx",
  "name": "example",
  "enabled": true,
  "usage": "SIP",
  "cid_number_mask": "",
  "did_numbers": "1000",
  "office_hours_forward_rule": {
    "action": "HANGUP"
  },
  "non_office_hours_forward_rule": {
    "action": "HANGUP"
  },
  "holiday_forward_rule": {
    "action": "HANGUP"
  },
  "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": [],
  "provider_id": "xxxxxx",
  "enable_advanced_routing": true,
  "advanced_routing": "",
  "enable_audio_recording": false
}

Update an inbound rule

post

Update an inbound rule.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequiredExample: NzAwNTUxOTA5NzczMTQ4MTYw
Body
namestring · min: 1 · max: 64Optional

Inbound rule name.

enabledbooleanOptional

Enabled or not.

Default: true
usagestring · enumOptional

The inbound rule usage, can be either:

  • BOTH: Applies to both messages and calls.
  • SIP: Applies to calls only.
  • MESSAGE: Applies to messages only.
Default: BOTHPossible values:
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.

holidaysstring[]Optional

A collection of ID of tenant's holiday.

Example: NzAwNTUxOTA5NzczMTQ4MTYw
provider_idstringOptionalExample: NzAwNTUxOTA5NzczMTQ4MTYw
enable_advanced_routingbooleanOptional

Whether to enable advanced routing.

Default: false
advanced_routingstringOptional

Advanced routing rules.

enable_audio_recordingbooleanOptional

Whether to enable audio recording.

Default: false
Responses
200

OK

No content

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

{
  "name": "example",
  "enabled": true,
  "usage": "SIP",
  "cid_number_mask": "",
  "did_numbers": "1000",
  "office_hours_forward_rule": {
    "action": "HANGUP"
  },
  "non_office_hours_forward_rule": {
    "action": "HANGUP"
  },
  "holiday_forward_rule": {
    "action": "HANGUP"
  },
  "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": [],
  "provider_id": "xxxxxx",
  "enable_advanced_routing": true,
  "advanced_routing": "",
  "enable_audio_recording": false
}

No content

Delete an inbound rule

post

Destroy an inbound rule.

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

No Content

No content

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

No content

Export inbound rules

get

Export a collection of inbound rules to file.

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

OK

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

Last updated

Was this helpful?