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

# List the calling user's Terms of Service agreements

> Returns the Terms of Service agreements the authenticated user has on file. Each entry records the version agreed to and when. Most users only have one agreement per product, but if the ToS is updated and the user re-agrees a new entry is added.

Results are paginated with the standard `page[number]` / `page[size]` parameters; the response uses the standard `{data, meta}` JSON:API envelope.

By default this returns agreements for **all** products the user has agreed to. Pass the `product_type` query parameter to scope the result to a single product.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/branded-calling/terms-of-service.yml get /terms_of_service/agreements
openapi: 3.1.0
info:
  title: Telnyx Branded Calling Terms of Service API
  version: 2.0.0
  description: >-
    Agree to the Branded Calling Terms of Service and review your agreement
    status.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /terms_of_service/agreements:
    get:
      tags:
        - Terms of Service
      summary: List the calling user's Terms of Service agreements
      description: >-
        Returns the Terms of Service agreements the authenticated user has on
        file. Each entry records the version agreed to and when. Most users only
        have one agreement per product, but if the ToS is updated and the user
        re-agrees a new entry is added.


        Results are paginated with the standard `page[number]` / `page[size]`
        parameters; the response uses the standard `{data, meta}` JSON:API
        envelope.


        By default this returns agreements for **all** products the user has
        agreed to. Pass the `product_type` query parameter to scope the result
        to a single product.
      operationId: listTermsOfServiceAgreements
      parameters:
        - name: product_type
          in: query
          required: false
          description: >-
            Optional filter. Omit to list the user's agreements for **every**
            product (branded_calling and number_reputation); pass a value to
            return only that product's agreements.
          schema:
            $ref: '#/components/schemas/TosProductType'
          example: branded_calling
        - $ref: '#/components/parameters/BcPageNumber'
        - $ref: '#/components/parameters/BcPageSize'
      responses:
        '200':
          description: Paginated list of agreements.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TosAgreementList'
        default:
          $ref: '#/components/responses/branded-calling_GenericErrorResponse'
        4XX:
          $ref: '#/components/responses/branded-calling_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
            });


            // Automatically fetches more pages as needed.

            for await (const agreementListResponse of
            client.termsOfService.agreements.list()) {
              console.log(agreementListResponse.id);
            }
        - 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
            )
            page = client.terms_of_service.agreements.list()
            page = page.data[0]
            print(page.id)
        - 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\tpage, err := client.TermsOfService.Agreements.List(context.TODO(), telnyx.TermsOfServiceAgreementListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\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.termsofservice.agreements.AgreementListPage;

            import
            com.telnyx.sdk.models.termsofservice.agreements.AgreementListParams;


            public final class Main {
                private Main() {}

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

                    AgreementListPage page = client.termsOfService().agreements().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.terms_of_service.agreements.list

            puts(page)
        - 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 {
              $page = $client->termsOfService->agreements->list(
                pageNumber: 1, pageSize: 20, productType: 'branded_calling'
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx terms-of-service:agreements list \
              --api-key 'My API Key'
components:
  schemas:
    TosProductType:
      type: string
      enum:
        - branded_calling
        - number_reputation
      description: Telnyx product the Terms of Service apply to.
      example: branded_calling
    TosAgreementList:
      type: object
      description: Paginated list of Terms of Service agreements for the calling user.
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TosAgreement'
        meta:
          $ref: '#/components/schemas/branded-calling_PaginationMeta'
    TosAgreement:
      type: object
      description: >-
        A recorded user agreement to a product's Terms of Service. The `user_id`
        is intentionally NOT echoed back on this public surface - the caller
        already knows their own identity.
      properties:
        id:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
          readOnly: true
        terms_version:
          type: string
          example: v1.0.0
        version:
          type: string
          description: >-
            Convenience alias of `terms_version`. Both keys are present on every
            response.
          example: v1.0.0
          readOnly: true
        product_type:
          $ref: '#/components/schemas/TosProductType'
        agreed_at:
          type: string
          format: date-time
          example: '2025-07-10T10:30:00Z'
          readOnly: true
        created_at:
          type: string
          format: date-time
          example: '2025-07-10T10:30:00Z'
          readOnly: true
    branded-calling_PaginationMeta:
      type: object
      required:
        - total_pages
        - total_results
        - page_number
        - page_size
      properties:
        total_pages:
          type: integer
          example: 3
          description: Total number of pages available given the current `page_size`.
        total_results:
          type: integer
          example: 42
          description: Total number of items across all pages (excludes soft-deleted rows).
        page_number:
          type: integer
          example: 1
          description: >-
            1-based index of this page. Echoes the `page[number]` query
            parameter (default `1`).
        page_size:
          type: integer
          example: 20
          description: Number of items returned in this page's `data` array. Capped at 250.
      description: >-
        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.
    branded-calling_Errors:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/branded-calling_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).
    branded-calling_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.
  parameters:
    BcPageNumber:
      name: page[number]
      in: query
      description: >-
        1-based page number. Out-of-range values return an empty page with
        correct meta.
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
        example: 1
    BcPageSize:
      name: page[size]
      in: query
      description: Items per page. Maximum 250; values above are clamped to 250.
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 20
        example: 20
  responses:
    branded-calling_GenericErrorResponse:
      description: >-
        An error occurred. The response carries the standard Telnyx error
        envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/branded-calling_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

````