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 describing 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 objects associated with the phone number that you have purchased. Objects can be of type `cnam`, `e911, `route`, or `messaging-provision`. For object details, see included routes in "Purchase a Phone Number".

    • route
      object

      A route object has the following information.

      • attributes
        object

        Route object composed of the following properties:

        • alias string- Alias for the route.

        • edge_strategy_id integer- The edge strategy ID associated with your inbound route. To see the list of different edge strategies, run this curl command: curl -u accessKey:secretKey https://api.flowroute.com/v2/routes/edge_strategies

        • route_type string- Indicates the type of route: host, number, uri, or sip-reg. sip-reg is the default route type assigned to a phone number's primary voice route which you can change via Specify Primary Voice Route for a Phone Number. To create a new route to be assigned to your newly purchased phone number, see Create an Inbound Route.

        • value stringValue that the route was set to.

      • id
        integer

        ID of the route object for your phone number.

      • links
        object

        Links object pointing to the route's URI. For example, https://api.flowroute.com/v2/routes/0.

      • type
        string

        This will always be route.

    • cnam
      object

      A cnam object has the following information.

      • attributes
        object

        CNAM object composed of the following properties:

        • value stringValue that the CNAM was set to.

      • id
        integer

        ID of the CNAM object for your newly purchased phone number.

      • links
        object

        Links object pointing to the CNAM's URI. For example, https://api.flowroute.com/v2/cnams/28526.

      • type
        string

        This will always be cnam.

    • e911
      object

      A e911 object has the following information.

      • attributes
        object

        Attributes object associated with the specified E911 record. For an explanation of the different attributes, see E911 Attributes on List Account E911 Attributes.

      • id
        integer

        Unique identifier of the E911 record.

      • links
        object

        Links object pointing to the E911 address record's URI. For example, https://api.flowroute.com/v2/e911s/20155.

      • type
        string

        This will always be e911.

    • Message Provision
      object

      A message_provisioning_status object has the following information.

      • attributes
        object

        Attributes object associated with the specified Message Provision record.

        • status stringThe status of the Message Provision request.

        • tn stringThe number associated with this Message Provision request.

      • id
        integer

        Unique identifier of the Message Provision request.

      • links
        object

        Links object pointing to the Message Provision record's URI. For example, https://api.flowroute.com/v2/message-provision/status/03d30058ac2747c5b5ac59b0588dbc45.

      • type
        string

        This will always be message_provisioning_status.

  • 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/12062011682 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/12062011682 -u accessKey:secretKey

                        

Example Responses

200 OK

{
  "data": {
    "attributes": {
      "alias": "Flowroute",
      "cnam_lookups_enabled": true,
      "messaging_enabled": true,
      "number_type": "longcode",
      "rate_center": "bainbdg is",
      "state": "wa",
      "iso_country": "US",
      "status": "PORTING_IN",
      "value": "12062011682"
    },
    "id": "12062011682",
    "links": {
      "self": "https://api.flowroute.com/v2/numbers/12062011682"
    },
    "relationships": {
      "cnam_preset": {
        "data": null
      },
      "e911_address": {
        "data": null
      },
      "failover_route": {
        "data": {
          "id": "87046",
          "type": "route"
        }
      },
      "primary_route": {
        "data": {
          "id": "83861",
          "type": "route"
        }
      }
    },
    "type": "number"
  },
  "included": [
    {
      "attributes": {
        "alias": null,
        "edge_strategy_id": null,
        "route_type": "uri",
        "value": "sip:12065551212@215.122.69.152:5060"
      },
      "id": "83861",
      "links": {
        "self": "https://api.flowroute.com/v2/routes/83861"
      },
      "type": "route"
    },
    {
      "attributes": {
        "alias": null,
        "edge_strategy_id": null,
        "route_type": "H",
        "value": "gSj5z.kevgriffin.com"
      },
      "id": "87046",
      "links": {
        "self": "https://api.flowroute.com/v2/routes/87046"
      },
      "type": "route"
    },
    {
      "attributes": {
        "value": "Flowroute"
      },
      "id": "26",
      "links": {
        "self": "https://api.flowroute.com/v2/cnams/26"
      },
      "type": "cnam"
    },
    {
      "attributes": {
        "address_type": "Building",
        "address_type_number": "Floor 5",
        "city": "Seattle",
        "country": "USA",
        "first_name": "John",
        "label": "Home",
        "last_name": "Doe",
        "state": "WA",
        "street_name": "3rd Ave",
        "street_number": "1218",
        "zip": "98101"
      },
      "id": "27475",
      "type": "e911"
    },
    {
      "attributes": {
        "status": "processing",
        "tn": "12062011682"
      },
      "type": "message_provisioning_status",
      "id": "03d30058ac2747c5b5ac59b0588dbc45",
      "links": {
        "self": "https://api.flowroute.com/v2/message-provision/status/03d30058ac2747c5b5ac59b0588dbc45"
      }
    }
  ],
  "links": {
    "self": "https://api.flowroute.com/v2/numbers/12062011682"
  }
}

            

404 NOT FOUND

{
  "errors": [
    {
      "detail": "Number not associated with your account: 12064621860. ",
      "id": "6c91c6a9-e0aa-4369-9f39-d68b83556a3e",
      "status": 404,
      "title": "Resource not found."
    }
  ]
}