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

# Create an inventory coverage request

> Creates an inventory coverage request. If locality, npa or national_destination_code is used in groupBy, and no region or locality filters are used, the whole paginated set is returned.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/coverage.yml get /inventory_coverage
openapi: 3.1.0
info:
  title: Telnyx Coverage API
  version: 2.0.0
  description: API for Coverage information.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /inventory_coverage:
    get:
      tags:
        - Inventory Level
      summary: Create an inventory coverage request
      description: >-
        Creates an inventory coverage request. If locality, npa or
        national_destination_code is used in groupBy, and no region or locality
        filters are used, the whole paginated set is returned.
      operationId: CreateInventoryCoverage
      parameters:
        - name: filter
          in: query
          style: deepObject
          explode: true
          description: >-
            Consolidated filter parameter (deepObject style). Originally:
            filter[npa], filter[nxx], filter[administrative_area],
            filter[phone_number_type], filter[country_code], filter[count],
            filter[features], filter[groupBy]
          schema:
            type: object
            properties:
              npa:
                type: integer
                description: Filter by npa
              nxx:
                type: integer
                description: Filter by nxx
              administrative_area:
                type: string
                description: Filter by administrative area
              phone_number_type:
                type: string
                description: Filter by phone number type
                enum:
                  - local
                  - toll_free
                  - national
                  - mobile
                  - landline
                  - shared_cost
              country_code:
                type: string
                description: Filter by country. Defaults to US
                enum:
                  - AT
                  - AU
                  - BE
                  - BG
                  - CA
                  - CH
                  - CN
                  - CY
                  - CZ
                  - DE
                  - DK
                  - EE
                  - ES
                  - FI
                  - FR
                  - GB
                  - GR
                  - HU
                  - HR
                  - IE
                  - IT
                  - LT
                  - LU
                  - LV
                  - NL
                  - NZ
                  - MX
                  - 'NO'
                  - PL
                  - PT
                  - RO
                  - SE
                  - SG
                  - SI
                  - SK
                  - US
              count:
                type: boolean
                description: Include count in the result
              features:
                type: array
                items:
                  type: string
                  enum:
                    - sms
                    - mms
                    - voice
                    - fax
                    - emergency
                example:
                  - voice
                  - sms
                description: >-
                  Filter if the phone number should be used for voice, fax, mms,
                  sms, emergency. Returns features in the response when used.
              groupBy:
                type: string
                description: Filter to group results
                enum:
                  - locality
                  - npa
                  - national_destination_code
      responses:
        '200':
          $ref: '#/components/responses/InventoryCoverageResponse'
        '400':
          $ref: '#/components/responses/numbers_BadRequestResponse'
        '401':
          $ref: '#/components/responses/numbers_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/numbers_NotFoundResponse'
        '422':
          $ref: '#/components/responses/numbers_UnprocessableEntity'
        '500':
          $ref: '#/components/responses/numbers_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 inventoryCoverages = await client.inventoryCoverage.list();

            console.log(inventoryCoverages.data);
        - 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
            )
            inventory_coverages = client.inventory_coverage.list()
            print(inventory_coverages.data)
        - 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\tinventoryCoverages, err := client.InventoryCoverage.List(context.TODO(), telnyx.InventoryCoverageListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", inventoryCoverages.Data)\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.inventorycoverage.InventoryCoverageListParams;

            import
            com.telnyx.sdk.models.inventorycoverage.InventoryCoverageListResponse;


            public final class Main {
                private Main() {}

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

                    InventoryCoverageListResponse inventoryCoverages = client.inventoryCoverage().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            inventory_coverages = telnyx.inventory_coverage.list

            puts(inventory_coverages)
        - lang: CLI
          source: |-
            telnyx inventory-coverage list \
              --api-key 'My API Key'
components:
  responses:
    InventoryCoverageResponse:
      description: Successful response with a list of inventory coverage levels
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/InventoryCoverage'
              meta:
                $ref: '#/components/schemas/InventoryCoverageMetadata'
    numbers_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
          examples:
            Authentication Failed:
              value:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not understand the provided credentials.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
    numbers_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnprocessableEntity:
      description: Unprocessable entity. Check the 'detail' field in response for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
  schemas:
    InventoryCoverage:
      type: object
      properties:
        group:
          type: string
          example: '318'
        group_type:
          type: string
          example: npa
        number_range:
          type: integer
          example: 1
        number_type:
          type: string
          enum:
            - did
            - toll-free
          example: did
        phone_number_type:
          type: string
          enum:
            - local
            - toll_free
            - national
            - landline
            - shared_cost
            - mobile
          example: local
        coverage_type:
          type: string
          enum:
            - number
            - block
          example: number
        record_type:
          type: string
          example: inventory_coverage_group
        administrative_area:
          type: string
          example: NJ
        count:
          type: integer
          example: 3
        advance_requirements:
          type: boolean
          example: true
          description: Indicates if the phone number requires advance requirements.
      example:
        group: '318'
        group_type: npa
        number_range: 1
        number_type: did
        phone_number_type: local
        coverage_type: number
        record_type: inventory_coverage_group
        administrative_area: NJ
        count: 3
        advance_requirements: true
    InventoryCoverageMetadata:
      type: object
      example:
        total_results: 25
      properties:
        total_results:
          type: integer
          example: 25
    numbers_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/numbers_Error'
      type: object
    numbers_Error:
      properties:
        code:
          type: string
          example: '10007'
        title:
          type: string
          example: Unexpected error
        detail:
          type: string
          example: An unexpected error occured.
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              example: /base
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
              description: URL with additional information on the error.
              example: https://developers.telnyx.com/docs/overview/errors/10015
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````