List available country codes for phone number search.
This endpoint returns a list of country codes where phone numbers are available for purchase from the specified provider.
Args: provider: Provider to get country codes from (‘twilio’ or ‘telnyx’)
Returns: CountryCodesResponse: List of available country codes
provider (string, optional): Provider to get country codes from ("twilio" or "telnyx"). Defaults to "telnyx"200 OK status with available country codes.
success (boolean): Whether the request completed successfullycountry_codes (array of strings): List of available ISO 3166-1 alpha-2 country codesprovider (string): Provider used for the query (“twilio” or “telnyx”)| Code | Country | Twilio | Telnyx |
|---|---|---|---|
US | United States | ✅ | ✅ |
CA | Canada | ✅ | ✅ |
GB | United Kingdom | ✅ | ✅ |
AU | Australia | ✅ | ✅ |
DE | Germany | ✅ | ✅ |
FR | France | ✅ | ✅ |
IT | Italy | ✅ | ✅ |
ES | Spain | ✅ | ✅ |
NL | Netherlands | ✅ | ✅ |
BE | Belgium | ✅ | ✅ |
SE | Sweden | ✅ | ⚠️ |
NO | Norway | ✅ | ⚠️ |
DK | Denmark | ✅ | ⚠️ |
| Issue | Cause | Solution |
|---|---|---|
| Empty country list | Provider API down | Try alternative provider |
| Unexpected countries | API change | Update your country mappings |
| Missing countries | Provider limitations | Check provider documentation |
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.