Returns a list of all phone numbers currently on your Flowroute account.
Endpoint
GET /numbersQuery Parameters
-
starts_with
integerDisplays a list of phone numbers that starts with your specified value.
To specify a country, use + and country code, such as +44, otherwise a default country code of '1' will be used.
-
contains
integerDisplays a list of phone numbers that contains your specified value.
-
ends_with
integerDisplays a list of phone numbers with the specified value as their final digits.
-
alias
stringURL encoded nonunique friendly name, up to 64 characters. No partial matches. Ex: For an alias of Home Phone only https://api.flowroute.com/v2/numbers?alias=Home%20Phone will match.
-
limit
integerLimits the number of items to retrieve. A maximum of 200 items can be retrieved with 10 being the default value if not specified.
-
offset
integerOffsets the list of phone numbers by your specified value. For example, if you have 4 phone numbers and you entered 1 as your offset value, then only 3 of your phone numbers will be displayed in the response.
Response Fields
On success, the HTTP status code in the response header is 200 OK and the response body contains an array of phone number objects in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.
-
data
arrayAn array of phone number objects in your account that satisfy your query.
-
attributes
objectDifferent attributes of a phone number object:
alias string- Friendly name for the phone number.
cnam_lookups_enabled boolean- Indicates whether CNAM (Caller-ID Name) Lookup is enabled for the phone number. To learn about setting this up, please see Set an Outbound Caller ID Name (CNAM Storage).
number_type string- Phone number type. Possible values are longcode and toll-free.
rate_center string- The rate center associated with the area code and exchange code (NPANXX). This is represented by the abbreviated value, not the full name as differentiated in the NPA Rate Center Reports.
state string- The 2-letter abbreviated US state or Canadian province or territory in which the area code and exchange code (NPANXX) is located. For example, WA for Washington State, USA and AB for Alberta, Canada.
iso_country string- The 2-letter country code for the location of the number.
status string- the status of the number. This would be either 'PURCHASED' or 'PORTING_IN'.
value integer- 10-digit phone number with the prefix for the country code.
-
id
integerID of the phone number object which is equal to its value.
-
links
objectLinks object pointing to the phone number's URI. For example, https://api.flowroute.com/v2/numbers/12012061234.
-
type
stringThis will always be number.
-
links
objectLinks object pointing to your search and a link to the next page if any. For example, https://api.flowroute.com/v2/numbers?starts_with=1206&limit=10&offset=0.
Example Request
GET /v2/numbers?starts_with=206 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Example Request
curl -X GET https://api.flowroute.com/v2/numbers?starts_with=206 -u accessKey:secretKey
Example Responses
200 OK
{
"data": [
{
"attributes": {
"alias": null,
"cnam_lookups_enabled": true,
"messaging_enabled": true,
"number_type": "longcode",
"rate_center": "bainbdg is",
"state": "wa",
"status": "PORTING_IN",
"iso_country": "US",
"value": "12062011682"
},
"id": "12062011682",
"links": {
"self": "https://api.flowroute.com/v2/numbers/12062011682"
},
"type": "number"
},
{
"attributes": {
"alias": null,
"cnam_lookups_enabled": false,
"messaging_enabled": false,
"number_type": "longcode",
"rate_center": "seattle",
"state": "wa",
"value": "12064621860"
},
"id": "12064621860",
"links": {
"self": "https://api.flowroute.com/v2/numbers/12064621860"
},
"type": "number"
}
],
"links": {
"self": "https://api.flowroute.com/v2/numbers?starts_with=1206&limit=10&offset=0"
}
}
422 UNPROCESSABLE ENTITY
{
"errors": [
{
"detail": {
"limit": [
"Not a valid integer."
]
},
"id": "07f2df99-f31d-45ce-93d3-1512f81ab27d",
"status": 422
}
]
}