List all requirement types
List all requirement types ordered by created_at descending
GET
/
requirement_types
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const requirementTypes = await client.requirementTypes.list();
console.log(requirementTypes.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
)
requirement_types = client.requirement_types.list()
print(requirement_types.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"),
)
requirementTypes, err := client.RequirementTypes.List(context.TODO(), telnyx.RequirementTypeListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementTypes.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeListParams;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RequirementTypeListResponse requirementTypes = client.requirementTypes().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
requirement_types = telnyx.requirement_types.list
puts(requirement_types)<?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 {
$requirementTypes = $client->requirementTypes->list(
filter: ['name' => ['contains' => 'utility bill']], sort: ['name']
);
var_dump($requirementTypes);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx requirement-types list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/requirement_types \
--header 'Authorization: Bearer <token>'{
"data": [
{
"acceptance_criteria": {
"time_limit": "Current and not expired",
"locality_limit": "Issued by the same country that the phone number belongs to",
"acceptable_values": [
"US"
],
"max_length": 20,
"min_length": 16,
"acceptable_characters": "abcdef0123456789"
},
"description": "Proves the customer has a physical address in the same locality as the phone number",
"example": "Utility bill, internet bill, phone bill, or lease",
"type": "document",
"name": "Proof of Address",
"record_type": "requirement_type",
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"created_at": "2021-04-09T22:25:27.521Z",
"updated_at": "2021-04-12T20:20:20.020Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Consolidated filter parameter for requirement types (deepObject style). Originally: filter[name]
Show child attributes
Show child attributes
Consolidated sort parameter for requirement types (deepObject style). Originally: sort[]
Specifies the sort order for results. If you want to sort by a field in ascending order, include it as a sort parameter. If you want to sort in descending order, prepend a - in front of the field name.
Available options:
name, created_at, updated_at, -name, -created_at, -updated_at Example:
["name"]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 requirementTypes = await client.requirementTypes.list();
console.log(requirementTypes.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
)
requirement_types = client.requirement_types.list()
print(requirement_types.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"),
)
requirementTypes, err := client.RequirementTypes.List(context.TODO(), telnyx.RequirementTypeListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementTypes.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeListParams;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RequirementTypeListResponse requirementTypes = client.requirementTypes().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
requirement_types = telnyx.requirement_types.list
puts(requirement_types)<?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 {
$requirementTypes = $client->requirementTypes->list(
filter: ['name' => ['contains' => 'utility bill']], sort: ['name']
);
var_dump($requirementTypes);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx requirement-types list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/requirement_types \
--header 'Authorization: Bearer <token>'{
"data": [
{
"acceptance_criteria": {
"time_limit": "Current and not expired",
"locality_limit": "Issued by the same country that the phone number belongs to",
"acceptable_values": [
"US"
],
"max_length": 20,
"min_length": 16,
"acceptable_characters": "abcdef0123456789"
},
"description": "Proves the customer has a physical address in the same locality as the phone number",
"example": "Utility bill, internet bill, phone bill, or lease",
"type": "document",
"name": "Proof of Address",
"record_type": "requirement_type",
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"created_at": "2021-04-09T22:25:27.521Z",
"updated_at": "2021-04-12T20:20:20.020Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}