Returns a list of your inbound routes. From the list, you can then select routes to use as the primary and failover routes for phone numbers on your account, which you can do via Update Primary Voice Route and Update Failover Voice Route.
Endpoint
GET /routesQuery Parameters
-
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 routes by your specified value. For example, if you have 4 inbound routes and you entered 1 as your offset value, then only 3 of your routes will be displayed in the response.
-
route_type
stringRestricts the results to inbound routes with your specified route type. Possible values are sip-reg, host
,uri, or number and must be specified in lowercase.
Response Fields
On success, the HTTP status code in the response header is 200 OK and the response body contains an array of route 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 route objects individually composed of:
-
attributes
Object composed of attributes associated with a route:
alias Friendly name for the route.
route_type Indicates the type of route: host, number, uri, or sip-reg. sip-reg is the default type assigned to a voice route if none is assigned.
value Value that was assigned to the route. See definition in "Create an Inbound Route" for possible route values according to the route type.
-
id
integerUnique identifier of the route.
-
links
objectLinks object pointing to the route's URI. For example, https://api.flowroute.com/v2/routes/98396.
-
type
stringThis will always be route.
-
links
objectLinks object pointing to your search and a link to the next page if any. For example, https://api.flowroute.com/v2/routes?limit=3&offset=3.
Example Request
GET /v2/routes?limit=3 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Example Request
curl -X GET https://api.flowroute.com/v2/routes?limit=3 -u accessKey:secretKey
Example Responses
200 OK
{
"data": [
{
"attributes": {
"alias": "sip-reg",
"route_type": "sip-reg",
"value": null
},
"id": "0",
"links": {
"self": "https://api.flowroute.com/v2/routes/0"
},
"type": "route"
},
{
"attributes": {
"alias": "PSTNroute1",
"route_type": "number",
"value": "12065551212"
},
"id": "83834",
"links": {
"self": "https://api.flowroute.com/v2/routes/83834"
},
"type": "route"
},
{
"attributes": {
"alias": "MyHost",
"route_type": "host",
"value": "24.239.23.40:5060"
},
"id": "83860",
"links": {
"self": "https://api.flowroute.com/v2/routes/83860"
},
"type": "route"
}
],
"links": {
"next": "https://api.flowroute.com/v2/routes?limit=3&offset=3",
"self": "https://api.flowroute.com/v2/routes?limit=3&offset=0"
}
}
422 UNPROCESSABLE ENTITY
{
"errors": [
{
"detail": {
"limit": [
"Not a valid integer."
]
},
"id": "4de849a7-6b27-49da-b053-144dc738b282",
"status": 422
}
]
}