List Phone Number Details

Returns details on a specific phone number associated with your account, including primary voice route, and failover voice route if previously configured.

Endpoint

GET /numbers/:id

Path Parameters

  • id
    integer required

    Phone number to search for which must be a number that you own. The number must be in 11-digit E.164 format with the first digit being the country code 1. For example, 12061231234.

Response Fields

On success, the HTTP status code in the response header is 200 OK and the response body contains a phone number object in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.

  • data
    object

    Phone number object composed of the following:

    • attributes
      object

      Object detailing phone number attributes defined in List Account Phone Numbers.

    • id
      integer

      ID of the phone number object which is equal to its value.

    • links
      object

      Links object pointing to the phone number's URI. For example, https://api.flowroute.com/v2/numbers/16502390214.

    • relationships
      object

      Object desribing the different relationships your phone number can have such as CNAM Presets, e911 Addresses, and Primary and Failover Routes all of which are represented as individual JSON objects.

    • type
      string

      This will always be number.

  • included
    array

    An array of route objects associated with the phone number that you have purchased. For object details, see included routes in "Purchase a Phone Number".

  • links
    string

    Links object pointing to the phone number that you have searched for. For example, https://api.flowroute.com/v2/numbers/16502390214.

Example Request

GET /v2/numbers/12064621860 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/12064621860 -u accessKey:secretKey

                        

Example Responses

200 OK

{
  "data": {
    "attributes": {
      "alias": null,
      "cnam_lookups_enabled": false,
      "number_type": "longcode",
      "rate_center": "seattle",
      "state": "wa",
      "value": "12064621860"
    },
    "id": "12064621860",
    "links": {
      "self": "https://api.flowroute.com/v2/numbers/12064621860"
    },
    "relationships": {
      "cnam_preset": {
        "data": null
      },
      "e911_address": {
        "data": null
      },
      "failover_route": {
        "data": null
      },
      "primary_route": {
        "data": {
          "id": "0",
          "type": "route"
        }
      }
    },
    "type": "number"
  },
  "included": [
    {
      "attributes": {
        "alias": "sip-reg",
        "route_type": "sip-reg",
        "value": null
      },
      "id": "0",
      "links": {
        "self": "https://api.flowroute.com/v2/routes/0"
      },
      "type": "route"
    }
  ],
  "links": {
    "self": "https://api.flowroute.com/v2/numbers/12064621860"
  }
}

            

404 NOT FOUND

{
  "errors": [
    {
      "detail": "Number not found 6391723423456",
      "id": "3b3754f1-83e6-4599-85a6-7e1a87a9ca6c",
      "status": 404
    }
  ]
}