import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const regulatoryRequirement = await client.regulatoryRequirements.retrieve();
console.log(regulatoryRequirement.data);{
"data": [
{
"country_code": "DE",
"phone_number_type": "local",
"action": "ordering",
"regulatory_requirements": [
{
"description": "Address matching the DID area code (street, building number, postal code, city and country)",
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"example": "600 Congress Avenue, 14th Floor, Austin, TX 78701",
"name": "Address matching the DID area code",
"field_type": "address_id",
"acceptance_criteria": {
"locality_limit": "Identical locality as the numbers desired",
"time_limit": "Less than 5 months old",
"regex": "regex field value must match",
"case_sensitive": "Whether field value is case sensitive",
"acceptable_characters": "Characters that can be included in field value",
"acceptable_values": [
"<string>"
],
"max_length": "10",
"min_length": "5"
}
}
]
}
]
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const regulatoryRequirement = await client.regulatoryRequirements.retrieve();
console.log(regulatoryRequirement.data);{
"data": [
{
"country_code": "DE",
"phone_number_type": "local",
"action": "ordering",
"regulatory_requirements": [
{
"description": "Address matching the DID area code (street, building number, postal code, city and country)",
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"example": "600 Congress Avenue, 14th Floor, Austin, TX 78701",
"name": "Address matching the DID area code",
"field_type": "address_id",
"acceptance_criteria": {
"locality_limit": "Identical locality as the numbers desired",
"time_limit": "Less than 5 months old",
"regex": "regex field value must match",
"case_sensitive": "Whether field value is case sensitive",
"acceptable_characters": "Characters that can be included in field value",
"acceptable_values": [
"<string>"
],
"max_length": "10",
"min_length": "5"
}
}
]
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[phone_number], filter[requirement_group_id], filter[country_code], filter[phone_number_type], filter[action]
Show child attributes
Phone number to check requirements for
"+41215470622"
ID of requirement group to check requirements for
"d4c0b4a6-7bd2-40c5-a3b9-2acd99e212b2"
Country code(iso2) to check requirements for
"DE"
Phone number type to check requirements for
local, toll_free, mobile, national, shared_cost Action to check requirements for
ordering, porting, action An array of Regulatory Requirements Responses
Show child attributes
"DE"
"local"
"ordering"
Show child attributes
"Address matching the DID area code (street, building number, postal code, city and country)"
"12ade33a-21c0-473b-b055-b3c836e1c292"
"600 Congress Avenue, 14th Floor, Austin, TX 78701"
"Address matching the DID area code"
"address_id"
Show child attributes
"Identical locality as the numbers desired"
"Less than 5 months old"
"regex field value must match"
"Whether field value is case sensitive"
"Characters that can be included in field value"
"10"
"5"
Was this page helpful?