> ## 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.

# Get reputation data for a phone number

> 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 classification
- `maturity_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 refresh



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/number-reputation/phone-numbers.yml get /enterprises/{enterprise_id}/reputation/numbers/{phone_number}
openapi: 3.1.0
info:
  title: Telnyx Phone Number Reputation API
  version: 2.0.0
  description: >-
    Associate phone numbers for reputation monitoring, query spam scores and
    risk levels, and manage ongoing monitoring. Includes simplified endpoints
    for single-enterprise accounts.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /enterprises/{enterprise_id}/reputation/numbers/{phone_number}:
    get:
      tags:
        - Reputation Phone Numbers
      summary: Get reputation data for a phone number
      description: >-
        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 classification

        - `maturity_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 refresh
      operationId: GetPhoneNumberReputation
      parameters:
        - $ref: '#/components/parameters/EnterpriseId'
        - $ref: '#/components/parameters/PhoneNumber'
        - name: fresh
          in: query
          description: >-
            When true, fetches fresh reputation data (incurs API cost). When
            false, returns cached data.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Phone number reputation data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReputationPhoneNumberWithReputation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Enterprise is not approved for reputation tracking
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branded-calling_ErrorResponse'
        '404':
          description: Phone number is not associated with this enterprise
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branded-calling_ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            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);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            number = client.enterprises.reputation.numbers.retrieve(
                phone_number="+16035551234",
                enterprise_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
            )
            print(number.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tnumber, err := client.Enterprises.Reputation.Numbers.Get(\n\t\tcontext.TODO(),\n\t\t\"+16035551234\",\n\t\ttelnyx.EnterpriseReputationNumberGetParams{\n\t\t\tEnterpriseID: \"6a09cdc3-8948-47f0-aa62-74ac943d6c58\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", number.Data)\n}\n"
        - lang: Java
          source: >-
            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.NumberRetrieveParams;

            import
            com.telnyx.sdk.models.enterprises.reputation.numbers.NumberRetrieveResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    NumberRetrieveParams params = NumberRetrieveParams.builder()
                        .enterpriseId("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
                        .phoneNumber("+16035551234")
                        .build();
                    NumberRetrieveResponse number = client.enterprises().reputation().numbers().retrieve(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            number = telnyx.enterprises.reputation.numbers.retrieve(
              "+16035551234",
              enterprise_id: "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
            )

            puts(number)
        - lang: CLI
          source: |-
            telnyx enterprises:reputation:numbers retrieve \
              --api-key 'My API Key' \
              --enterprise-id 6a09cdc3-8948-47f0-aa62-74ac943d6c58 \
              --phone-number +16035551234
components:
  parameters:
    EnterpriseId:
      name: enterprise_id
      in: path
      required: true
      description: Unique identifier of the enterprise (UUID)
      schema:
        type: string
        format: uuid
        example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
    PhoneNumber:
      name: phone_number
      in: path
      required: true
      description: Phone number in E.164 format
      schema:
        type: string
        example: '+16035551234'
  schemas:
    ReputationPhoneNumberWithReputation:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ReputationPhoneNumberWithReputationData'
    branded-calling_ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TelnyxError'
    ReputationPhoneNumberWithReputationData:
      allOf:
        - $ref: '#/components/schemas/ReputationPhoneNumberPublic'
        - type: object
          properties:
            reputation_data:
              oneOf:
                - $ref: '#/components/schemas/ReputationData'
                - type: object
                  nullable: true
              description: Reputation metrics (null if not yet fetched)
    TelnyxError:
      type: object
      properties:
        code:
          type: string
          description: Telnyx error code
          example: '10015'
        title:
          type: string
          description: Short error title
          example: Bad Request
        detail:
          type: string
          description: Human-readable error detail
          example: User has already agreed to Terms of Service version v1.0.0
        meta:
          type: object
          properties:
            url:
              type: string
              format: uri
              description: Link to error documentation
        source:
          type: object
          description: Reference to the field that caused the error
          properties:
            pointer:
              type: string
              description: JSON pointer (RFC6901) to the field that caused the error
              example: /body/organization_type
      required:
        - code
        - title
    ReputationPhoneNumberPublic:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
        phone_number:
          type: string
          description: Phone number in E.164 format
          example: '+16035551234'
        enterprise_id:
          type: string
          format: uuid
          description: ID of the associated enterprise
        created_at:
          type: string
          format: date-time
          description: When the number was associated
        updated_at:
          type: string
          format: date-time
          description: When the record was last updated
    ReputationData:
      type: object
      description: Reputation metrics
      properties:
        spam_risk:
          type: string
          nullable: true
          enum:
            - low
            - medium
            - high
          description: Overall spam risk level
        spam_category:
          type: string
          nullable: true
          description: Spam category classification (e.g., Telemarketing, Debt Collector)
        maturity_score:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Maturity metric (0–100). Higher = more established number
        connection_score:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Connection quality metric (0–100)
        engagement_score:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Engagement metric (0–100). Higher = more positive engagement
        sentiment_score:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Sentiment metric (0–100). Higher = more positive sentiment
        last_refreshed_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of the last reputation data refresh
  responses:
    Unauthorized:
      description: Unauthorized — missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/branded-calling_ErrorResponse'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````