Phone Number

Search available phone numbers

Changed on

Returns US or Canadian numbers the carrier has for sale, local or toll-free, narrowed by area code or by digits the number must contain. When an area code has no numbers, nearby ones are returned flagged bestEffort; an empty list means nothing matched. Buy one with POST /v1/phone-number, or let Roark pick with autoPick.

get/v1/phone-number/available

Request

  • Base URL
    https://api.roark.ai
  • URL
    https://api.roark.ai/v1/phone-number/available
  • Auth
    HTTP bearer

Query parameters

country'US' | 'CA'

ISO 3166-1 alpha-2 country of the number: US or CA

Example:US
numberType'LOCAL' | 'TOLL_FREE'

LOCAL for a number in an area code, TOLL_FREE for one from the shared US and Canada toll-free pool

Example:LOCAL
areaCodestring

Three-digit area code, or a toll-free prefix such as 800. When it has no numbers, nearby ones are returned instead, flagged bestEffort.

Example:415
containsstring

Digits or letters the number must contain (1 to 7, * matches any digit)

Example:555
limitinteger

Maximum number of results (default: 20, max: 100)

Response

Numbers available to buy

Example response

{
  "data": [
    {
      "e164": "+14155550123"
    }
  ]
}

Changes

    • info

      added the new optional query request parameter country

    • info

      added the new optional query request parameter numberType

    • info

      for the query request parameter limit, the max was increased from 50.00 to 100.00

    • info

      added the required property // to the response with the status

    • info

      endpoint added