Register phone numbers for reputation monitoring
Add up to 100 phone numbers to reputation monitoring on this enterprise. Each must be in E.164 format (+1NPANXXXXXX for US/CA) and belong to your Telnyx phone-number inventory.
Prerequisite: reputation must already be enabled on this enterprise (see POST .../reputation).
Pricing: This is a billable action. See https://telnyx.com/pricing/numbers for current pricing.
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.enterprises.reputation.numbers.associate(
'4a6192a4-573d-446d-b3ce-aff9117272a6',
{ phone_numbers: ['+19493253498', '+12134445566'] },
);
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.enterprises.reputation.numbers.associate(
enterprise_id="4a6192a4-573d-446d-b3ce-aff9117272a6",
phone_numbers=["+19493253498", "+12134445566"],
)
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.Enterprises.Reputation.Numbers.Associate(
context.TODO(),
"4a6192a4-573d-446d-b3ce-aff9117272a6",
telnyx.EnterpriseReputationNumberAssociateParams{
PhoneNumbers: []string{"+19493253498", "+12134445566"},
},
)
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;
import com.telnyx.sdk.models.enterprises.reputation.numbers.NumberAssociateParams;
import com.telnyx.sdk.models.enterprises.reputation.numbers.NumberAssociateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
NumberAssociateParams params = NumberAssociateParams.builder()
.enterpriseId("4a6192a4-573d-446d-b3ce-aff9117272a6")
.addPhoneNumber("+19493253498")
.addPhoneNumber("+12134445566")
.build();
NumberAssociateResponse response = client.enterprises().reputation().numbers().associate(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.enterprises.reputation.numbers.associate(
"4a6192a4-573d-446d-b3ce-aff9117272a6",
phone_numbers: ["+19493253498", "+12134445566"]
)
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->enterprises->reputation->numbers->associate(
'4a6192a4-573d-446d-b3ce-aff9117272a6',
phoneNumbers: ['+19493253498', '+12134445566'],
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx enterprises:reputation:numbers associate \
--api-key 'My API Key' \
--enterprise-id 4a6192a4-573d-446d-b3ce-aff9117272a6 \
--phone-number "'+19493253498'" \
--phone-number "'+12134445566'"curl --request POST \
--url https://api.telnyx.com/v2/enterprises/{enterprise_id}/reputation/numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_numbers": [
"+19493253498",
"+12134445566"
]
}
'Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The enterprise id. Lowercase UUID.
"4a6192a4-573d-446d-b3ce-aff9117272a6"
Body
1–100 phone numbers in E.164 format with a leading +.
1 - 100 elementsResponse
Numbers registered.
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.enterprises.reputation.numbers.associate(
'4a6192a4-573d-446d-b3ce-aff9117272a6',
{ phone_numbers: ['+19493253498', '+12134445566'] },
);
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.enterprises.reputation.numbers.associate(
enterprise_id="4a6192a4-573d-446d-b3ce-aff9117272a6",
phone_numbers=["+19493253498", "+12134445566"],
)
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.Enterprises.Reputation.Numbers.Associate(
context.TODO(),
"4a6192a4-573d-446d-b3ce-aff9117272a6",
telnyx.EnterpriseReputationNumberAssociateParams{
PhoneNumbers: []string{"+19493253498", "+12134445566"},
},
)
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;
import com.telnyx.sdk.models.enterprises.reputation.numbers.NumberAssociateParams;
import com.telnyx.sdk.models.enterprises.reputation.numbers.NumberAssociateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
NumberAssociateParams params = NumberAssociateParams.builder()
.enterpriseId("4a6192a4-573d-446d-b3ce-aff9117272a6")
.addPhoneNumber("+19493253498")
.addPhoneNumber("+12134445566")
.build();
NumberAssociateResponse response = client.enterprises().reputation().numbers().associate(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.enterprises.reputation.numbers.associate(
"4a6192a4-573d-446d-b3ce-aff9117272a6",
phone_numbers: ["+19493253498", "+12134445566"]
)
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->enterprises->reputation->numbers->associate(
'4a6192a4-573d-446d-b3ce-aff9117272a6',
phoneNumbers: ['+19493253498', '+12134445566'],
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx enterprises:reputation:numbers associate \
--api-key 'My API Key' \
--enterprise-id 4a6192a4-573d-446d-b3ce-aff9117272a6 \
--phone-number "'+19493253498'" \
--phone-number "'+12134445566'"curl --request POST \
--url https://api.telnyx.com/v2/enterprises/{enterprise_id}/reputation/numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_numbers": [
"+19493253498",
"+12134445566"
]
}
'