Check out our upcoming events and meetups! View events →
Get detailed reputation data for a specific phone number associated with an enterprise.
Query Parameters:
fresh (default: false): When true, fetches fresh reputation data (incurs API cost). When false, returns cached data. If no cached data exists, fresh data is automatically fetched.Returns:
spam_risk: Overall spam risk level (low, medium, high)spam_category: Spam category classificationmaturity_score: Maturity metric (0–100)connection_score: Connection quality metric (0–100)engagement_score: Engagement metric (0–100)sentiment_score: Sentiment metric (0–100)last_refreshed_at: Timestamp of last data refreshimport Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const number = await client.enterprises.reputation.numbers.retrieve('+16035551234', {
enterprise_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
});
console.log(number.data);{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "+16035551234",
"enterprise_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reputation_data": {
"spam_risk": "low",
"spam_category": "<string>",
"maturity_score": 50,
"connection_score": 50,
"engagement_score": 50,
"sentiment_score": 50,
"last_refreshed_at": "2023-11-07T05:31:56Z"
}
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier of the enterprise (UUID)
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Phone number in E.164 format
"+16035551234"
When true, fetches fresh reputation data (incurs API cost). When false, returns cached data.
Phone number reputation data
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 number = await client.enterprises.reputation.numbers.retrieve('+16035551234', {
enterprise_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
});
console.log(number.data);{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "+16035551234",
"enterprise_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"reputation_data": {
"spam_risk": "low",
"spam_category": "<string>",
"maturity_score": 50,
"connection_score": 50,
"engagement_score": 50,
"sentiment_score": 50,
"last_refreshed_at": "2023-11-07T05:31:56Z"
}
}
}