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.

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
    }
  ]
}