List Phone Number Details

Use this endpoint to retrieve all of the information associated with a phone number, including billing method, primary route, and failover route.

Endpoint

GET /numbers/:id

Request Parameters

  • id
    string required

    Phone number to search for. Must be in 11-digit North American number format; e.g. 12061231234.

Response Fields

  • attributes

    Object composed of attributes explained in List Account Phone numbers.

  • relationships

    Object desribing the different relationships a phone number can have such as CNAM Presets, e911 Addresses, Primary and Failover Routes for Voice, SMS, MMS, and DLRs.

  • included

    Details related to a phone number's routes.

    • Route Details
    • 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/numbers/12064201234 HTTP/1.1
Content-Type: application/vnd.api+json

                        

Example Request

curl -X GET https://api.flowroute.com/v2.1/numbers/12064201234 -u accessKey:secretKey

                        

Example Response

200 OK

{
  "data": {
    "attributes": {
      "alias": "",
      "cnam_lookups_enabled": true,
      "number_type": "longcode",
      "rate_center": "seattle",
      "state": "wa",
      "value": "12064201234"
    },
    "id": "12064201234",
    "links": {
      "self": "https://api.flowroute.com/v2.1/numbers/12064201234"
    },
    "relationships": {
      "cnam_preset": {
        "data": {
          "id": "6272",
          "type": "cnam"
        }
      },
      "e911_address": {
        "data": null
      },
      "voice_failover_route": {
        "data": {
          "id": "48112",
          "type": "route"
        }
      },
      "voice_primary_route": {
        "data": {
          "id": "0",
          "type": "route"
        }
      },
      "sms_primary_route": {
        "data": {
          "id": "asdf1234",
          "type": "route"
        }
      },
      "sms_failover_route": {
        "data": {
          "id": "asdf1234",
          "type": "route"
        }
      },
      "mms_primary_route": {
        "data": {
          "id": "asdf1234",
          "type": "route"
        }
      },
      "mms_failover_route": {
        "data": {
          "id": "asdf1234",
          "type": "route"
        }
      },
      "dlr_primary_route": {
        "data": {
          "id": "asdf1234",
          "type": "route"
        }
      },
      "dlr_failover_route": {
        "data": {
          "id": "asdf1234",
          "type": "route"
        }
      }
    },
    "type": "number"
  },
  "included": [
    {
      "attributes": {
        "alias": "31eb6f7ddc950590d712fe4c4090ca92",
        "route_type": "sip-uri",
        "value": "sip:12562993422@54.213.241.113"
      },
      "id": "48112",
      "links": {
        "self": "https://api.flowroute.com/v2.1/routes/48112"
      },
      "type": "route"
    },
    {
      "attributes": {
        "alias": "debug_message_route",
        "route_type": "webhook",
        "value": "http://api.doug.com/debug"
      },
      "id": "48112",
      "links": {
        "self": "https://api.flowroute.com/v2.1/routes/48112"
      },
      "type": "route"
    },
    {
      "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": {
        "value": "SCW"
      },
      "id": "6272",
      "type": "cnam"
    }
  ],
  "links": {
    "self": "https://api.flowroute.com/v2.1/numbers/12064201234"
  }
}