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

# Render a phone-number reputation Letter of Authorization

> Render the LOA for this enterprise as a PDF. The enterprise identity, address, and authorized-representative contact are taken from the enterprise record; the optional `agent` block is supplied only when a third-party partner manages the numbers. The response is the PDF itself (unsigned unless a `signature` is provided). Sign it and upload it to the Telnyx Documents API (`POST /v2/documents`, see https://developers.telnyx.com/api/documents) to obtain the `loa_document_id` required by `POST .../reputation`.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/number-reputation/settings.yml post /enterprises/{enterprise_id}/reputation/loa
openapi: 3.1.0
info:
  title: Telnyx Number Reputation Settings API
  version: 2.0.0
  description: >-
    Enable, configure, and manage Number Reputation monitoring for your
    enterprise. Control auto-refresh frequency and manage the reputation
    monitoring lifecycle.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /enterprises/{enterprise_id}/reputation/loa:
    post:
      tags:
        - Reputation
      summary: Render a phone-number reputation Letter of Authorization
      description: >-
        Render the LOA for this enterprise as a PDF. The enterprise identity,
        address, and authorized-representative contact are taken from the
        enterprise record; the optional `agent` block is supplied only when a
        third-party partner manages the numbers. The response is the PDF itself
        (unsigned unless a `signature` is provided). Sign it and upload it to
        the Telnyx Documents API (`POST /v2/documents`, see
        https://developers.telnyx.com/api/documents) to obtain the
        `loa_document_id` required by `POST .../reputation`.
      operationId: generateReputationLoa
      parameters:
        - $ref: '#/components/parameters/EnterpriseId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseReputationLoaRender'
            example: {}
      responses:
        '200':
          description: Rendered LOA PDF.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/number-reputation_GenericErrorResponse'
        '401':
          $ref: '#/components/responses/number-reputation_GenericErrorResponse'
        '403':
          $ref: '#/components/responses/number-reputation_GenericErrorResponse'
        '404':
          $ref: '#/components/responses/number-reputation_GenericErrorResponse'
      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 response = await client.enterprises.reputation.loa.render(
              '4a6192a4-573d-446d-b3ce-aff9117272a6',
            );

            console.log(response);

            const content = await response.blob();
            console.log(content);
        - 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
            )
            response = client.enterprises.reputation.loa.render(
                enterprise_id="4a6192a4-573d-446d-b3ce-aff9117272a6",
            )
            print(response)
            content = response.read()
            print(content)
        - 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\tresponse, err := client.Enterprises.Reputation.Loa.Render(\n\t\tcontext.TODO(),\n\t\t\"4a6192a4-573d-446d-b3ce-aff9117272a6\",\n\t\ttelnyx.EnterpriseReputationLoaRenderParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\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.core.http.HttpResponse;

            import
            com.telnyx.sdk.models.enterprises.reputation.loa.LoaRenderParams;


            public final class Main {
                private Main() {}

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

                    HttpResponse response = client.enterprises().reputation().loa().render("4a6192a4-573d-446d-b3ce-aff9117272a6");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.enterprises.reputation.loa.render("4a6192a4-573d-446d-b3ce-aff9117272a6")


            puts(response)
        - lang: PHP
          source: >-
            <?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->loa->render(
                '4a6192a4-573d-446d-b3ce-aff9117272a6',
                agent: [
                  'administrativeArea' => 'administrative_area',
                  'city' => 'city',
                  'contactEmail' => 'dev@stainless.com',
                  'contactName' => 'contact_name',
                  'contactPhone' => '+13125550000',
                  'contactTitle' => 'contact_title',
                  'country' => 'US',
                  'legalName' => 'legal_name',
                  'postalCode' => 'postal_code',
                  'streetAddress' => 'street_address',
                  'dba' => 'dba',
                  'extendedAddress' => 'extended_address',
                ],
                signature: ['imageBase64' => 'image_base64', 'signerName' => 'signer_name'],
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx enterprises:reputation:loa render \
              --api-key 'My API Key' \
              --enterprise-id 4a6192a4-573d-446d-b3ce-aff9117272a6
components:
  parameters:
    EnterpriseId:
      name: enterprise_id
      in: path
      description: The enterprise id. Lowercase UUID.
      required: true
      schema:
        type: string
        format: uuid
        example: 4a6192a4-573d-446d-b3ce-aff9117272a6
  schemas:
    EnterpriseReputationLoaRender:
      type: object
      description: >-
        All fields optional. The enterprise identity, address, and
        authorized-representative contact are read from the enterprise record
        keyed by the path parameter.
      properties:
        agent:
          $ref: '#/components/schemas/AgentInput'
        signature:
          $ref: '#/components/schemas/LoaSignaturePayload'
    AgentInput:
      type: object
      description: >-
        Third-party reseller / partner managing the enterprise's phone numbers.
        Omit when the enterprise works directly with Telnyx.
      required:
        - legal_name
        - street_address
        - city
        - administrative_area
        - postal_code
        - country
        - contact_name
        - contact_title
        - contact_email
        - contact_phone
      properties:
        legal_name:
          type: string
          maxLength: 200
        dba:
          type: string
          nullable: true
          maxLength: 200
        street_address:
          type: string
          maxLength: 255
        extended_address:
          type: string
          nullable: true
          maxLength: 255
        city:
          type: string
          maxLength: 120
        administrative_area:
          type: string
          maxLength: 120
        postal_code:
          type: string
          maxLength: 30
        country:
          type: string
          minLength: 2
          maxLength: 2
          example: US
        contact_name:
          type: string
          maxLength: 200
        contact_title:
          type: string
          maxLength: 200
        contact_email:
          type: string
          format: email
        contact_phone:
          type: string
          maxLength: 30
          example: '+13125550000'
    LoaSignaturePayload:
      type: object
      description: >-
        Optional signature embedded in the rendered PDF. When omitted the PDF is
        returned unsigned for the customer to sign and upload.
      required:
        - image_base64
      properties:
        image_base64:
          type: string
          description: Base64-encoded signature image.
        signer_name:
          type: string
          nullable: true
    number-reputation_Errors:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/number-reputation_Error'
          description: List of one or more error entries. Order is not significant.
      description: >-
        Canonical Telnyx error envelope. Returned on every 4xx and 5xx response
        from this service. `errors` is non-empty; multiple entries indicate
        multiple distinct problems with the same request (e.g. one entry per
        invalid phone number on a bulk operation).
    number-reputation_Error:
      type: object
      required:
        - code
        - title
        - detail
        - meta
      properties:
        code:
          type: string
          example: '10005'
          description: >-
            Stable numeric Telnyx error catalog id. See `meta.url` for the full
            catalog entry.
        title:
          type: string
          example: Invalid parameters
          description: >-
            Short human-readable category, e.g. `Bad Request`, `Duplicate
            resource`, `Not Found`, `Forbidden`. Treat as advisory only - the
            stable identifier is `code`.
        detail:
          type: string
          example: field required
          description: >-
            Context-specific message describing what went wrong on this
            particular request. May embed offending values; do not rely on it
            for programmatic matching - branch on `code`.
        meta:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              format: uri
              example: https://developers.telnyx.com/docs/overview/errors/10005
            pending_check_ids:
              type: array
              items:
                type: string
                format: uuid
              description: >-
                Set on `422 vetting_checks_incomplete` responses from
                `/admin/dir/{id}/approve` and
                `/admin/phone-number-batches/approve`. Lists the still-pending
                vetting check ids.
            pending_check_codes:
              type: array
              items:
                type: string
              description: >-
                Codes of the pending vetting checks (e.g.
                `loa_signature_valid`).
            pending_check_labels:
              type: array
              items:
                type: string
              description: Human-readable labels of the pending vetting checks.
          description: >-
            Carries `url` linking to the Telnyx error catalog entry for this
            `code`. Useful for forwarding the user to documentation.
        source:
          type: object
          description: Optional pointer at the offending field of the request.
          properties:
            pointer:
              type: string
              example: /body/legal_name
            parameter:
              type: string
              example: page[size]
      description: >-
        A single entry in the canonical Telnyx error envelope. `code` is the
        stable Telnyx error catalog id; the human-readable explanation lives at
        `meta.url`. `detail` is a context-specific message; `source.pointer`
        (when present) names the offending field of the request.
  responses:
    number-reputation_GenericErrorResponse:
      description: >-
        An error occurred. The response carries the standard Telnyx error
        envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/number-reputation_Errors'
          examples:
            validation_error:
              summary: 422 - request body failed validation
              value:
                errors:
                  - code: '10005'
                    title: Invalid parameters
                    detail: field required
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10005
                    source:
                      pointer: /body/legal_name
            bad_request:
              summary: 400 - request rejected by a state guard
              description: >-
                Returned when the request itself is well-formed but the resource
                is in a state that disallows this action (e.g. updating a DIR
                while it is being vetted, or deleting an enterprise that still
                has DIRs in vetting).
              value:
                errors:
                  - code: '10015'
                    title: Bad Request
                    detail: Cannot update DIR in 'verified' status
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10015
            not_found:
              summary: 404 - resource does not exist or is not yours
              value:
                errors:
                  - code: '10009'
                    title: Resource not found
                    detail: Enterprise not found.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
            conflict:
              summary: 409 - request conflicts with current resource state
              value:
                errors:
                  - code: '10021'
                    title: Resource in use
                    detail: >-
                      DIR has 1 active infringement claim(s). Resolve the claim
                      before making this change.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10021
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````