otp/docs

Countries

List the countries you can buy numbers in, keyed by ISO 3166-1 alpha-2 code.

GET/v1/countries

List the countries you can buy numbers in. Use the country code (ISO 3166-1 alpha-2, lowercase) when checking prices or creating an activation.

curl
curl https://api.otp.black/v1/countries \
  -H "Authorization: Bearer $API_KEY"
200 OK
[
  { "country": "us", "name": "United States", "dial_code": "+1" },
  { "country": "gb", "name": "United Kingdom", "dial_code": "+44" },
  { "country": "in", "name": "India", "dial_code": "+91" }
]

Fields

  • country — ISO 3166-1 alpha-2 code, lowercase.
  • name — country display name.
  • dial_code — international dialling prefix.

On this page