> ## 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 SIM card groups

> Get all SIM card groups belonging to the user that match the given filters.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-groups.yml get /sim_card_groups
openapi: 3.1.0
info:
  title: SIM Card Groups API
  version: 2.0.0
  description: >-
    SIM card group management including group CRUD, group actions, and private
    wireless gateway and blocklist assignments.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sim_card_groups:
    get:
      tags:
        - SIM Card Groups
      summary: Get all SIM card groups
      description: >-
        Get all SIM card groups belonging to the user that match the given
        filters.
      operationId: GetAllSimCardGroups
      parameters:
        - $ref: '#/components/parameters/wireless_PageNumber'
        - $ref: '#/components/parameters/wireless_PageSize'
        - name: filter[name]
          description: A valid SIM card group name.
          schema:
            type: string
            example: My Test Group
          in: query
        - name: filter[private_wireless_gateway_id]
          description: A Private Wireless Gateway ID associated with the group.
          schema:
            format: uuid
            type: string
            example: 7606c6d3-ff7c-49c1-943d-68879e9d584d
          in: query
        - name: filter[wireless_blocklist_id]
          description: A Wireless Blocklist ID associated with the group.
          schema:
            format: uuid
            type: string
            example: 0f3f490e-c4d3-4cf5-838a-9970f10ee259
          in: query
      responses:
        '200':
          $ref: '#/components/responses/GetAllSimCardGroupsResponse'
        '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 simCardGroupListResponse of
            client.simCardGroups.list()) {
              console.log(simCardGroupListResponse.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.sim_card_groups.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.SimCardGroups.List(context.TODO(), telnyx.SimCardGroupListParams{})\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.simcardgroups.SimCardGroupListPage;
            import com.telnyx.sdk.models.simcardgroups.SimCardGroupListParams;

            public final class Main {
                private Main() {}

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

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

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

            page = telnyx.sim_card_groups.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->simCardGroups->list(
                filterName: 'My Test Group',
                filterPrivateWirelessGatewayID: '7606c6d3-ff7c-49c1-943d-68879e9d584d',
                filterWirelessBlocklistID: '0f3f490e-c4d3-4cf5-838a-9970f10ee259',
                pageNumber: 1,
                pageSize: 1,
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sim-card-groups 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:
    GetAllSimCardGroupsResponse:
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/SearchedSIMCardGroup'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
      description: Successful Response
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  schemas:
    SearchedSIMCardGroup:
      title: SIMCardGroup
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: Identifies the type of the resource.
          readOnly: true
          example: sim_card_group
        default:
          description: >-
            Indicates whether the SIM card group is the users default
            group.<br/>The default group is created for the user and can not be
            removed.
          type: boolean
          example: true
          readOnly: true
        name:
          description: A user friendly name for the SIM card group.
          type: string
          example: My Test Group
        data_limit:
          type: object
          description: >-
            Upper limit on the amount of data the SIM cards, within the group,
            can use.
          properties:
            amount:
              type: string
              example: '2048.1'
            unit:
              type: string
              example: MB
        consumed_data:
          $ref: '#/components/schemas/ConsumedData'
        sim_card_count:
          description: The number of SIM cards associated with the group.
          type: integer
          example: 10
          default: 0
        private_wireless_gateway_id:
          description: The identification of the related Private Wireless Gateway resource.
          format: uuid
          type: string
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
          default: null
        wireless_blocklist_id:
          description: The identification of the related Wireless Blocklist resource.
          format: uuid
          type: string
          example: 5aa584f6-14b1-41b2-8e01-1c04d1ee77c1
          default: null
        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
    ConsumedData:
      type: object
      title: ConsumedData
      description: Represents the amount of data consumed.
      properties:
        unit:
          type: string
          example: MB
          default: MB
        amount:
          type: string
          example: '2048.1'
    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

````