Use this endpoint to return a list of your inbound routes. In this new version, you can now create voice, SMS, MMS, and DLR routes. From the list, you can select any of the service-specific routes and assign it to a phone number by following its reference guide:
- Update Primary Voice Route
- Update Failover Voice Route
- Update Primary SMS Route
- Update Failover SMS Route
- Update Primary MMS Route
- Update Failover MMS Route
- Update Primary DLR Route
- Update Failover DLR Route
Endpoint
GET /routesRequest Parameters
-
limit
integerLimits the number of items to retrieve. A maximum of 200 items can be retrieved.
-
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: Indicates the type of route: HOST, PSTN, URI, or SIP-REG for Voice, webhook for SMS, MMS, and DLRs. SIP-REG is the default name assigned to a voice route if none is assigned. A route type can be created using Create an Inbound Route.
Response Fields
aliasAlias for the route.
route_type: Indicates the type of route: HOST, PSTN, URI, or SIP-REG for Voice, webhook for SMS, MMS, and DLRs. SIP-REG is the default name assigned to a voice route if none is assigned. A route type can be created using Create an Inbound Route.
value: Value that the route was set to.
Example Request
GET /v2.1/routes HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Example Request
curl -X GET https://api.flowroute.com/v2.1/routes -u accessKey:secretKey
Example Response
200 OK
{
"data": [
{
"attributes": {
"alias": "sip-reg",
"route_type": "sip-reg",
"value": null
},
"id": "0",
"links": {
"self": "https://api.flowroute.com/v2.1/routes/0"
},
"type": "route"
},
{
"attributes": {
"alias": "fb6da186e68bce36adf454261d654c25",
"route_type": "host",
"value": "54.86.168.171"
},
"id": "45986",
"links": {
"self": "https://api.flowroute.com/v2.1/routes/45986"
},
"type": "route"
}
],
"links": {
"next": "https://api.flowroute.com/v2.1/routes?limit=2&offset=2",
"self": "https://api.flowroute.com/v2.1/routes?limit=2&offset=0"
}
}