About
Number Blocks can be searched and retrieved using the following request.
At least one of the parameters AccountSid or PropertySid must be provided.
Resource URI
GET
/v2/numberblocks/[Text]
or
/v2/Properties/[PropertySid]/numberblocks
or
/v2/Accounts/[AccountSid]/numberblocks
Request
URI Parameters
| Parameter | Type | Description |
|---|---|---|
| Text | string | The value that will be used for the search. It will be compared against one of the following number block properties: Number, Name, Friendly Name, Source, Medium, Campaign, Content. |
| PropertySid | string | Property secure identification to retrieve number details against. |
| AccountSid | string | Account secure identification to retrieve number details against. |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
| Active | boolean? | Filter by active (true), inactive (false), or all (null). |
| Sms | boolean? | Filter by SMS capability: true - with SMS capabilities, false - without, null - all. |
| Voice | boolean? | Filter by Voice capability: true - with Voice capabilities, false - without, null - all. |
| IncludeAssociations | boolean | Include related entities (e.g. assignments, analytics numbers) in the response. |
| Text | string | Free-text search within Number Blocks. |
| PageIndex | integer | Page index for pagination. Default: 0. |
| PageSize | integer | Number of results per page. Default: 10. |
| IncludeTotalCount | boolean | Include total count in response. Default: true. |
| SortBy | string | Field to sort by. Default: Id. |
| SortDir | string | Sorting direction: asc or desc. Default: asc. |
Response
200 – OK
A successful request returns a JSON object with paging information and an array of Number Blocks.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Id | integer | Internal ID of the Number Block. |
| NumberBlockSid | string | The secure identifier of the Number Block. |
| NumberPattern | string | The block number pattern (supports wildcards or ranges). |
| Name | string | Name of the Number Block. |
| FriendlyName | string | User-friendly name. |
| SipTrunkId | integer? | Linked SIP trunk ID (if applicable). |
| SipTrunkName | string | Name of the associated SIP trunk (if included). |
| RoutingMethod | string | Routing method (endpoint, programmable-voice, etc.). |
| TerminationNumber | string | Destination telephone number for calls. |
| ProgrammableVoiceUrl | string | URL for voice application routing. |
| Active | boolean | Indicates whether the Number Block is active. |
| HasSplitConfiguration | boolean | Indicates whether split configuration is enabled. |
| BlockSize | integer | Size of the block (number count). |
| RecordingEnabled | boolean | Indicates if call recording is enabled. |
| SupportsVoice | boolean | Whether the block supports Voice. |
| SupportsSms | boolean | Whether the block supports SMS. |
| SupportsMms | boolean | Whether the block supports MMS. |
| Created | datetime | Creation timestamp (UTC). |
| Modified | datetime? | Last modification timestamp (UTC). |
| QuarantineStartDate | datetime? | If quarantined, start date. |
| QuarantineEndDate | datetime? | If quarantined, end date. |
| SupplierName | string | Name of the carrier/supplier. |
| NumberBlockAssignments | array | List of number-to-project assignments. |
| AnalyticsDynamicNumbers | array | Analytics numbers associated with this block. |
Example Response
{
"Data": [
{
"RoutingMethod": "endpoint",
"NumberPattern": "+6173472809#",
"HasSplitConfiguration": false,
"Id": 45,
"NumberBlockSid": "BG84CFNA06P1RDJ7PFKEP819JTPN02MG",
"Number": "+6173472809#",
"Active": true,
"Action": 0,
"RecordingEnabled": false,
"BlockSize": 10,
"SupportsVoice": true,
"SupportsSms": false,
"SupportsMms": false,
"Created": "/Date(1726117072187-0000)/",
"Modified": "/Date(1752150029357-0000)/",
"AnalyticsDynamicNumbers": [
{
"Id": 386481,
"PublicNumber": "+61734728090",
"RoutingNumber": "+61734728090",
"Active": false,
"CountryCode": "AU",
"GeoCountry": "Australia",
"GeoRegion": "QLD",
"GeoCity": "Brisbane",
"SupportsVoice": true,
"SupportsSms": false,
"SupportsMms": false,
"SupplierName": "Globe",
"VoiceNetwork": "Fone Dynamics"
}
]
}
],
"PageIndex": 0,
"PageSize": 10,
"TotalCount": 20,
"SortBy": "Id",
"SortDir": "asc"
}
400 – Error
For error codes and messages, please refer to the
REST API Error Codes page.