List a DIR's authorized BPOs
List the BPO (Business Process Outsourcer) accounts a Brand Owner has authorized on this DIR, together with the review state of each authorization.
Authorizations are supplied as the bpo_authorizations array when creating or updating a DIR, and each one is reviewed on its own. Only an approved authorization adds that BPO to this DIR’s authorized callers in the branded calling registry; pending and rejected authorizations do not. Each entry includes the loa_document_id you submitted: because bpo_authorizations replaces the whole list on every DIR update, send each entry you want to keep back with its loa_document_id unchanged, and it keeps its review state. A rejected entry carries a rejection_reason. Returns an empty list when the DIR has authorized no BPOs.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.dir.retrieveBpoAuthorizations('dir_id');
console.log(response.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
)
response = client.dir.retrieve_bpo_authorizations(
"dir_id",
)
print(response.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"),
)
response, err := client.Dir.GetBpoAuthorizations(
context.TODO(),
"dir_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.dir().retrieveBpoAuthorizations("dir_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.dir.retrieve_bpo_authorizations("dir_id")
puts(response)<?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 {
$response = $client->dir->retrieveBpoAuthorizations(
'dir_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir retrieve-bpo-authorizations \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request GET \
--url https://api.telnyx.com/v2/dir/{dir_id}/bpo_authorizations \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "bpo_authorization",
"bpo_enterprise_id": "4a6192a4-573d-446d-b3ce-aff9117272a6",
"status": "pending",
"loa_document_id": "2a7e8337-e803-4057-a4ae-26c40eb0bc6c",
"rejection_reason": "Letter of Authorization is unsigned"
}
],
"meta": {
"total_pages": 3,
"total_results": 42,
"page_number": 1,
"page_size": 20
}
}Authorizations
Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
Path Parameters
The DIR id. Lowercase UUID.
"16635d38-75a6-4481-82e8-69af60e05011"
Query Parameters
1-based page number. Out-of-range values return an empty page with correct meta.
x >= 11
Items per page. Maximum 250; values above are clamped to 250.
1 <= x <= 25020
Response
Paginated list of the DIR's BPO authorizations.
Paginated list of a DIR's BPO authorizations.
Show child attributes
Show child attributes
JSON:API pagination metadata returned with every paginated list response. Page numbering is 1-based. page_size reports the number of items actually returned in data for this page; the requested size is taken from the page[size] query parameter.
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.dir.retrieveBpoAuthorizations('dir_id');
console.log(response.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
)
response = client.dir.retrieve_bpo_authorizations(
"dir_id",
)
print(response.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"),
)
response, err := client.Dir.GetBpoAuthorizations(
context.TODO(),
"dir_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.dir().retrieveBpoAuthorizations("dir_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.dir.retrieve_bpo_authorizations("dir_id")
puts(response)<?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 {
$response = $client->dir->retrieveBpoAuthorizations(
'dir_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir retrieve-bpo-authorizations \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request GET \
--url https://api.telnyx.com/v2/dir/{dir_id}/bpo_authorizations \
--header 'Authorization: Bearer <token>'{
"data": [
{
"record_type": "bpo_authorization",
"bpo_enterprise_id": "4a6192a4-573d-446d-b3ce-aff9117272a6",
"status": "pending",
"loa_document_id": "2a7e8337-e803-4057-a4ae-26c40eb0bc6c",
"rejection_reason": "Letter of Authorization is unsigned"
}
],
"meta": {
"total_pages": 3,
"total_results": 42,
"page_number": 1,
"page_size": 20
}
}