> ## 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 all requirements

> List all requirements with filtering, sorting, and pagination



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/regulatory.yml get /requirements
openapi: 3.1.0
info:
  title: Telnyx Regulatory Requirements API
  version: 2.0.0
  description: API for Regulatory requirements.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /requirements:
    get:
      tags:
        - Requirements
      summary: List all requirements
      description: List all requirements with filtering, sorting, and pagination
      operationId: ListRequirements
      parameters:
        - $ref: '#/components/parameters/FilterRequirementsConsolidated'
        - $ref: '#/components/parameters/SortRequirementsConsolidated'
        - $ref: '#/components/parameters/documents_PageConsolidated'
      responses:
        '200':
          $ref: '#/components/responses/ListRequirementsResponse'
        '422':
          description: >-
            Unprocessable entity. Check the 'detail' field in response for
            details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/documents_Errors'
        default:
          $ref: '#/components/responses/documents_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 requirementListResponse of
            client.requirements.list()) {
              console.log(requirementListResponse.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.requirements.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.Requirements.List(context.TODO(), telnyx.RequirementListParams{})\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.requirements.RequirementListPage;
            import com.telnyx.sdk.models.requirements.RequirementListParams;

            public final class Main {
                private Main() {}

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

                    RequirementListPage page = client.requirements().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.requirements.list

            puts(page)
        - lang: CLI
          source: |-
            telnyx requirements list \
              --api-key 'My API Key'
components:
  parameters:
    FilterRequirementsConsolidated:
      name: filter
      in: query
      style: deepObject
      explode: true
      required: false
      description: >-
        Consolidated filter parameter for requirements (deepObject style).
        Originally: filter[country_code], filter[phone_number_type],
        filter[action]
      schema:
        type: object
        additionalProperties: false
        properties:
          country_code:
            type: string
            example: US
            description: >-
              Filters results to those applying to a 2-character (ISO 3166-1
              alpha-2) country code
          phone_number_type:
            type: string
            enum:
              - local
              - national
              - toll_free
            example: local
            description: Filters results to those applying to a specific phone_number_type
          action:
            type: string
            enum:
              - branded_calling
              - ordering
              - porting
            example: porting
            description: Filters requirements to those applying to a specific action.
    SortRequirementsConsolidated:
      name: sort
      in: query
      required: false
      description: >-
        Consolidated sort parameter for requirements (deepObject style).
        Originally: sort[]
      schema:
        type: array
        items:
          type: string
          enum:
            - created_at
            - updated_at
            - country_code
            - phone_number_type
            - '-created_at'
            - '-updated_at'
            - '-country_code'
            - '-phone_number_type'
        example:
          - country_code
        description: >-
          Specifies the sort order for results. If you want to sort by a field
          in ascending order, include it as a sort parameter. If you want to
          sort in descending order, prepend a `-` in front of the field name.
    documents_PageConsolidated:
      name: page
      in: query
      style: deepObject
      explode: true
      description: >-
        Consolidated page parameter (deepObject style). Originally: page[size],
        page[number]
      schema:
        type: object
        properties:
          size:
            type: integer
            minimum: 1
            maximum: 250
            default: 20
            description: The size of the page
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load
  responses:
    ListRequirementsResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/DocReqsRequirementList'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
    documents_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/documents_Errors'
  schemas:
    documents_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/documents_Error'
      type: object
    DocReqsRequirementList:
      type: array
      items:
        $ref: '#/components/schemas/DocReqsRequirement'
    PaginationMeta:
      type: object
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 55
        page_number:
          type: integer
          example: 2
        page_size:
          type: integer
          example: 25
    documents_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
    DocReqsRequirement:
      type: object
      properties:
        record_type:
          description: Identifies the type of the resource.
          type: string
          readOnly: true
          example: requirement
        country_code:
          description: >-
            The 2-character (ISO 3166-1 alpha-2) country code where this
            requirement applies
          type: string
          readOnly: false
          example: FR
        locality:
          description: The locality where this requirement applies
          type: string
          readOnly: false
          example: Nice
        phone_number_type:
          description: >-
            Indicates the phone_number_type this requirement applies to. Leave
            blank if this requirement applies to all number_types.
          type: string
          enum:
            - local
            - national
            - toll_free
          example: local
          readOnly: false
        action:
          description: >-
            Indicates whether this requirement applies to branded_calling,
            ordering, porting, or both ordering and porting
          type: string
          enum:
            - both
            - branded_calling
            - ordering
            - porting
          example: ordering
          readOnly: false
        requirements_types:
          description: Lists the requirement types necessary to fulfill this requirement
          type: array
          items:
            $ref: '#/components/schemas/DocReqsRequirementType'
          readOnly: true
        id:
          description: Identifies the associated document
          type: string
          format: uuid
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2021-04-09T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was last
            updated.
          readOnly: true
          example: '2021-04-12T20:20:20.020Z'
    DocReqsRequirementType:
      type: object
      properties:
        acceptance_criteria:
          description: Specifies objective criteria for acceptance
          type: object
          properties:
            time_limit:
              description: Specifies time-based acceptance criteria
              example: Current and not expired
              type: string
              readOnly: false
            locality_limit:
              description: Specifies geography-based acceptance criteria
              example: Issued by the same country that the phone number belongs to
              type: string
              readOnly: false
            acceptable_values:
              description: >-
                Specifies the list of strictly possible values for the
                requirement. Ignored when empty
              type: array
              items:
                type: string
                example: US
              readOnly: false
            max_length:
              description: Maximum length allowed for the value
              type: integer
              example: 20
              readOnly: false
            min_length:
              description: Minimum length allowed for the value
              type: integer
              example: 16
              readOnly: false
            acceptable_characters:
              description: Specifies the allowed characters as a string
              type: string
              example: abcdef0123456789
              readOnly: false
        description:
          description: Describes the requirement type
          example: >-
            Proves the customer has a physical address in the same locality as
            the phone number
          type: string
          readOnly: false
        example:
          description: Provides one or more examples of acceptable documents
          example: Utility bill, internet bill, phone bill, or lease
          type: string
          readOnly: false
        type:
          description: Defines the type of this requirement type
          example: document
          type: string
          enum:
            - document
            - address
            - textual
          readOnly: false
        name:
          description: A short descriptive name for this requirement_type
          example: Proof of Address
          type: string
          readOnly: true
        record_type:
          description: Identifies the type of the resource
          example: requirement_type
          type: string
          readOnly: true
        id:
          description: Identifies the associated document
          type: string
          format: uuid
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2021-04-09T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was last
            updated.
          readOnly: true
          example: '2021-04-12T20:20:20.020Z'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````