Numbers & Inventory

List cities

Retrieve a list of cities within a country where DID numbers are available.

Important notes:

  • For a country with has_provinces_or_states, numbers_search_show narrows to one state by its region_id from numbers_countries_regions_index
  • Each city includes count of available DIDs
  • Cities are returned with area codes

When to use:

  • Building city selection for countries without states
  • Checking DID availability by city
  • Displaying available locations to users

cities[].id feeds numbers_countries_cities_dids_index and numbers_search_show (city_id).

get/api/v2/numbers/countries/{country_id}/cities

Request

  • Base URL: https://app.didlogic.com
  • URL: https://app.didlogic.com/api/v2/numbers/countries/{country_id}/cities
  • Auth: HTTP bearer

Path parameters

country_idinteger required

Country id from numbers_countries_index

Response

returns list of cities

Example response

{
  "cities": [
    {
      "id": 251,
      "name": "New York",
      "area_code": "212200",
      "count": 1
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.