List requirement groups
GET
/
requirement_groups
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const requirementGroups = await client.requirementGroups.list();
console.log(requirementGroups);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
requirement_groups = client.requirement_groups.list()
print(requirement_groups)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"),
)
requirementGroups, err := client.RequirementGroups.List(context.TODO(), telnyx.RequirementGroupListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroups)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementgroups.RequirementGroup;
import com.telnyx.sdk.models.requirementgroups.RequirementGroupListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
List<RequirementGroup> requirementGroups = client.requirementGroups().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
requirement_groups = telnyx.requirement_groups.list
puts(requirement_groups)<?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 {
$requirementGroups = $client->requirementGroups->list(
filter: [
'action' => 'ordering',
'countryCode' => 'country_code',
'customerReference' => 'customer_reference',
'phoneNumberType' => 'local',
'status' => 'approved',
],
);
var_dump($requirementGroups);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx requirement-groups list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/requirement_groups \
--header 'Authorization: Bearer <token>'[
{
"id": "<string>",
"country_code": "<string>",
"phone_number_type": "<string>",
"action": "<string>",
"customer_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"record_type": "requirement_group",
"regulatory_requirements": [
{
"requirement_id": "<string>",
"field_value": "<string>",
"field_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
]{
"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"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Consolidated filter parameter (deepObject style). Originally: filter[country_code], filter[phone_number_type], filter[action], filter[status], filter[customer_reference]
Show child attributes
Show child attributes
Response
List requirement groups
Available options:
approved, unapproved, pending-approval, declined, expired Example:
"requirement_group"
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 requirementGroups = await client.requirementGroups.list();
console.log(requirementGroups);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
requirement_groups = client.requirement_groups.list()
print(requirement_groups)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"),
)
requirementGroups, err := client.RequirementGroups.List(context.TODO(), telnyx.RequirementGroupListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroups)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementgroups.RequirementGroup;
import com.telnyx.sdk.models.requirementgroups.RequirementGroupListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
List<RequirementGroup> requirementGroups = client.requirementGroups().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
requirement_groups = telnyx.requirement_groups.list
puts(requirement_groups)<?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 {
$requirementGroups = $client->requirementGroups->list(
filter: [
'action' => 'ordering',
'countryCode' => 'country_code',
'customerReference' => 'customer_reference',
'phoneNumberType' => 'local',
'status' => 'approved',
],
);
var_dump($requirementGroups);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx requirement-groups list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/requirement_groups \
--header 'Authorization: Bearer <token>'[
{
"id": "<string>",
"country_code": "<string>",
"phone_number_type": "<string>",
"action": "<string>",
"customer_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"record_type": "requirement_group",
"regulatory_requirements": [
{
"requirement_id": "<string>",
"field_value": "<string>",
"field_type": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
]{
"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"
}
}
]
}