Retrieve regulatory requirements
GET
/
regulatory_requirements
JavaScript
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);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
regulatory_requirement = client.regulatory_requirements.retrieve()
print(regulatory_requirement.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
regulatoryRequirement, err := client.RegulatoryRequirements.Get(context.TODO(), telnyx.RegulatoryRequirementGetParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", regulatoryRequirement.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.regulatoryrequirements.RegulatoryRequirementRetrieveParams;
import com.telnyx.sdk.models.regulatoryrequirements.RegulatoryRequirementRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RegulatoryRequirementRetrieveResponse regulatoryRequirement = client.regulatoryRequirements().retrieve();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
regulatory_requirement = telnyx.regulatory_requirements.retrieve
puts(regulatory_requirement)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$regulatoryRequirement = $client->regulatoryRequirements->retrieve(
filter: [
'action' => 'ordering',
'countryCode' => 'DE',
'phoneNumber' => '+41215470622',
'phoneNumberType' => 'local',
'requirementGroupID' => 'd4c0b4a6-7bd2-40c5-a3b9-2acd99e212b2',
],
);
var_dump($regulatoryRequirement);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx regulatory-requirements retrieve \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/regulatory_requirements \
--header 'Authorization: Bearer <token>'{
"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"
}
}
]
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
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
Show child attributes
Response
An array of Regulatory Requirements Responses
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
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);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
regulatory_requirement = client.regulatory_requirements.retrieve()
print(regulatory_requirement.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
regulatoryRequirement, err := client.RegulatoryRequirements.Get(context.TODO(), telnyx.RegulatoryRequirementGetParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", regulatoryRequirement.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.regulatoryrequirements.RegulatoryRequirementRetrieveParams;
import com.telnyx.sdk.models.regulatoryrequirements.RegulatoryRequirementRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RegulatoryRequirementRetrieveResponse regulatoryRequirement = client.regulatoryRequirements().retrieve();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
regulatory_requirement = telnyx.regulatory_requirements.retrieve
puts(regulatory_requirement)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$regulatoryRequirement = $client->regulatoryRequirements->retrieve(
filter: [
'action' => 'ordering',
'countryCode' => 'DE',
'phoneNumber' => '+41215470622',
'phoneNumberType' => 'local',
'requirementGroupID' => 'd4c0b4a6-7bd2-40c5-a3b9-2acd99e212b2',
],
);
var_dump($regulatoryRequirement);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx regulatory-requirements retrieve \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/regulatory_requirements \
--header 'Authorization: Bearer <token>'{
"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"
}
}
]
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}