> ## 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 all traffic policy profiles

> Get all traffic policy profiles belonging to the user that match the given filters.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-configuration.yml get /traffic/policy/profiles
openapi: 3.1.0
info:
  title: SIM Cards Configuration API
  version: 2.0.0
  description: >-
    Network configuration for SIM cards including public IP management, private
    wireless gateways, blocklists, traffic policy profiles, and data usage
    notifications.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /traffic/policy/profiles:
    get:
      tags:
        - Traffic Policy Profiles
      summary: Get all traffic policy profiles
      description: >-
        Get all traffic policy profiles belonging to the user that match the
        given filters.
      operationId: GetTrafficPolicyProfiles
      parameters:
        - $ref: '#/components/parameters/wireless_PageNumber'
        - $ref: '#/components/parameters/wireless_PageSize'
        - name: filter[type]
          description: Filter by traffic policy profile type.
          in: query
          required: false
          schema:
            type: string
            enum:
              - whitelist
              - blacklist
              - throttling
          example: whitelist
        - name: filter[service]
          description: Filter by service ID.
          in: query
          required: false
          schema:
            type: string
          example: service_123
        - name: sort
          description: >-
            Sorts traffic policy profiles by the given field. Defaults to
            ascending order unless field is prefixed with a minus sign.
          in: query
          required: false
          schema:
            type: string
            enum:
              - service
              - '-service'
              - type
              - '-type'
      responses:
        '200':
          $ref: '#/components/responses/GetTrafficPolicyProfilesResponse'
        '401':
          description: Unauthorized
        default:
          $ref: '#/components/responses/wireless_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 trafficPolicyProfile of
            client.trafficPolicyProfiles.list()) {
              console.log(trafficPolicyProfile.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.traffic_policy_profiles.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.TrafficPolicyProfiles.List(context.TODO(), telnyx.TrafficPolicyProfileListParams{})\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.trafficpolicyprofiles.TrafficPolicyProfileListPage;

            import
            com.telnyx.sdk.models.trafficpolicyprofiles.TrafficPolicyProfileListParams;


            public final class Main {
                private Main() {}

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

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

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

            page = telnyx.traffic_policy_profiles.list

            puts(page)
        - lang: CLI
          source: |-
            telnyx traffic-policy-profiles list \
              --api-key 'My API Key'
components:
  parameters:
    wireless_PageNumber:
      name: page[number]
      in: query
      description: The page number to load.
      schema:
        type: integer
        minimum: 1
        default: 1
    wireless_PageSize:
      name: page[size]
      in: query
      description: The size of the page.
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 20
  responses:
    GetTrafficPolicyProfilesResponse:
      description: Successful Response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/TrafficPolicyProfile'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  schemas:
    TrafficPolicyProfile:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          readOnly: true
          example: traffic_policy_profile
        type:
          description: The type of the traffic policy profile.
          type: string
          enum:
            - whitelist
            - blacklist
            - throttling
          example: whitelist
        services:
          description: Array of PCEF service IDs included in the profile.
          type: array
          items:
            type: string
          example:
            - service_123
            - service_456
        ip_ranges:
          description: Array of IP ranges in CIDR notation.
          type: array
          items:
            type: string
          example:
            - 10.64.0.0/24
            - 10.64.0.0/25
        domains:
          description: Array of domain names.
          type: array
          items:
            type: string
          example:
            - www.hbomax.com
            - netflix.com
        limit_bw_kbps:
          description: Bandwidth limit in kbps.
          type:
            - integer
            - 'null'
          example: 512
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            updated.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
    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
    wireless_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/wireless_Error'
      type: object
    wireless_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
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````