List Account Phone Numbers

Returns a list of all phone numbers currently on your Flowroute account.

Endpoint

GET /numbers

Query Parameters

  • starts_with
    integer

    Displays a list of phone numbers that starts with your specified value. Country code 1 is optional.

  • contains
    integer

    Displays a list of phone numbers that contains your specified value.

  • ends_with
    integer

    Displays a list of phone numbers with the specified value as their final digits.

  • limit
    integer

    Limits the number of items to retrieve. A maximum of 200 items can be retrieved with 10 being the default value if not specified.

  • offset
    integer

    Offsets the list of phone numbers by your specified value. For example, if you have 4 phone numbers and you entered 1 as your offset value, then only 3 of your phone numbers will be displayed in the response.

Response Fields

On success, the HTTP status code in the response header is 200 OK and the response body contains an array of phone number 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
    array

    An array of phone number objects in your account that satisfy your query.

    • attributes
      object

      Different attributes of a phone number object:

      • alias string- Friendly name for the phone number.

      • cnam_lookups_enabled boolean- Indicates whether CNAM (Caller-ID Name) Lookup is enabled for the phone number. To learn about setting this up, please see Set an Outbound Caller ID Name (CNAM Storage).

      • number_type string- Phone number type. Possible values are longcode and toll-free.

      • rate_center string- The rate center associated with the area code and exchange code (NPANXX). This is represented by the abbreviated value, not the full name as differentiated in the NPA Rate Center Reports.

      • state string- The 2-letter abbreviated US state or Canadian province or territory in which the area code and exchange code (NPANXX) is located. For example, WA for Washington State, USA and AB for Alberta, Canada.

      • value integer- 10-digit North American phone number with the prefix 1 for the country code.

    • 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/12012061234.

    • type
      string

      This will always be number.

  • links
    object

    Links object pointing to your search and a link to the next page if any. For example, https://api.flowroute.com/v2/numbers?starts_with=1206&limit=10&offset=0.

Example Request

GET /v2/numbers?starts_with=206 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?starts_with=206 -u accessKey:secretKey

                        

Example Responses

200 OK

{
  "data": [
    {
      "attributes": {
        "alias": null,
        "cnam_lookups_enabled": true,
        "number_type": "longcode",
        "rate_center": "bainbdg is",
        "state": "wa",
        "value": "12062011682"
      },
      "id": "12062011682",
      "links": {
        "self": "https://api.flowroute.com/v2/numbers/12062011682"
      },
      "type": "number"
    },
    {
      "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"
      },
      "type": "number"
    }
  ],
  "links": {
    "self": "https://api.flowroute.com/v2/numbers?starts_with=1206&limit=10&offset=0"
  }
}

            

422 UNPROCESSABLE ENTITY

{
  "errors": [
    {
      "detail": {
        "limit": [
          "Not a valid integer."
        ]
      },
      "id": "07f2df99-f31d-45ce-93d3-1512f81ab27d",
      "status": 422
    }
  ]
}