Get regulatory requirements
Get the regulatory information needed to buy a phone number, for one specific number or for a country and number type. Prefer phoneNumber: the response is then exactly the list the purchase of that number validates against. Pass each requirementTypes[].id back as requirementType in regulatoryRequirements on POST /v1/phone-numbers.
For phoneNumber, the requirements of that exact number are returned. When they cannot be resolved for the number itself, the list for its country and type is returned instead, and the purchase uses the same list. An empty items array means the number needs no regulatory information. If the requirements cannot be retrieved at all, the response is 502 requirements_unavailable, never an empty list.
URL-encode the + of phoneNumber as %2B. An unencoded + is also accepted.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Query parameters
countryCodestringTwo-letter ISO country code. Required unless
phoneNumberis given.Limitsmin length 2 · max length 2typestringType of phone number (local, national, mobile, tollFree). Defaults to
local. WithphoneNumber, used only when the number's own requirements cannot be resolved and the country list is returned.One oflocalnationaltollFreemobilephoneNumberstringE.164 number from
GET /v1/phone-numbers/available, with+encoded as%2B. Returns the requirements the purchase of that number checks. Takes precedence overcountryCode.
Responses
200Requirements for the number, or for the country and type.
itemsobject[]required5 properties
idstringrequiredcountryCodestringrequiredphoneNumberTypestringrequiredactionstringrequiredrequirementTypesobject[]required6 properties
idstringrequiredSend this as
requirementTypeinregulatoryRequirementswhen purchasing.namestringrequireddescriptionstringrequiredtypestringrequiredType of requirement field.
One oftextualaddressdocumentactionexamplestringacceptanceCriteriaobjectAcceptance criteria for a requirement.
4 properties
minLengthintegermaxLengthintegerallowedValuesstring[]regexPatternstring
400Neither `countryCode` nor `phoneNumber` was given, one is malformed, or the requirements cannot be looked up for this input (`invalid_request`).
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
502The requirements could not be retrieved right now. Retry; do not treat this as "no requirements".
codestringrequiredmessagestringrequireddetailsobject