Telnyx Inventory Level API

Inventory Level

OpenAPI Specification

telnyx-inventory-level-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: support@telnyx.com
  description: Telnyx provides global communications and connectivity APIs for developers — including SIP trunking, programmable voice, SMS, MMS, WhatsApp Business Messaging, Call Control, Fax, Wireless (IoT & eSIM), Phone Numbers (DID provisioning & porting), Emergency Services, and Network APIs for private interconnects and edge connectivity. Build, scale, and manage voice, messaging, and data networks with Telnyx's carrier-grade global infrastructure and API-first platform.
  title: Telnyx Access Tokens Inventory Level API
  version: 2.0.0
  x-endpoint-cost: light
servers:
- description: Version 2.0.0 of the Telnyx API
  url: https://api.telnyx.com/v2
security:
- bearerAuth: []
tags:
- description: Inventory Level
  name: Inventory Level
paths:
  /inventory_coverage:
    get:
      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:
      - 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]'
        explode: true
        in: query
        name: filter
        schema:
          properties:
            administrative_area:
              description: Filter by administrative area
              type: string
            count:
              description: Include count in the result
              type: boolean
            country_code:
              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
              type: string
            features:
              description: Filter if the phone number should be used for voice, fax, mms, sms, emergency. Returns features in the response when used.
              example:
              - voice
              - sms
              items:
                enum:
                - sms
                - mms
                - voice
                - fax
                - emergency
                type: string
              type: array
            groupBy:
              description: Filter to group results
              enum:
              - locality
              - npa
              - national_destination_code
              type: string
            npa:
              description: Filter by npa
              type: integer
            nxx:
              description: Filter by nxx
              type: integer
            phone_number_type:
              description: Filter by phone number type
              enum:
              - local
              - toll_free
              - national
              - mobile
              - landline
              - shared_cost
              type: string
          type: object
        style: deepObject
      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'
      summary: Create an inventory coverage request
      tags:
      - Inventory Level
      x-latency-category: responsive
components:
  schemas:
    InventoryCoverageMetadata:
      example:
        total_results: 25
      properties:
        total_results:
          example: 25
          type: integer
      type: object
    numbers_Errors:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/numbers_Error'
          type: array
      type: object
    numbers_Error:
      properties:
        code:
          example: '10007'
          type: string
        detail:
          example: An unexpected error occured.
          type: string
        meta:
          properties:
            url:
              description: URL with additional information on the error.
              example: https://developers.telnyx.com/docs/overview/errors/10015
              type: string
          type: object
        source:
          properties:
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              example: /base
              type: string
          type: object
        title:
          example: Unexpected error
          type: string
      type: object
    InventoryCoverage:
      example:
        administrative_area: NJ
        advance_requirements: true
        count: 3
        coverage_type: number
        group: '318'
        group_type: npa
        number_range: 1
        number_type: did
        phone_number_type: local
        record_type: inventory_coverage_group
      properties:
        administrative_area:
          example: NJ
          type: string
        advance_requirements:
          description: Indicates if the phone number requires advance requirements.
          example: true
          type: boolean
        count:
          example: 3
          type: integer
        coverage_type:
          enum:
          - number
          - block
          example: number
          type: string
        group:
          example: '318'
          type: string
        group_type:
          example: npa
          type: string
        number_range:
          example: 1
          type: integer
        number_type:
          enum:
          - did
          - toll-free
          example: did
          type: string
        phone_number_type:
          enum:
          - local
          - toll_free
          - national
          - landline
          - shared_cost
          - mobile
          example: local
          type: string
        record_type:
          example: inventory_coverage_group
          type: string
      type: object
  responses:
    numbers_UnauthorizedResponse:
      content:
        application/json:
          examples:
            Authentication Failed:
              value:
                errors:
                - code: '10009'
                  detail: Could not understand the provided credentials.
                  meta:
                    url: https://developers.telnyx.com/docs/overview/errors/10009
                  title: Authentication failed
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: Unauthorized
    numbers_UnprocessableEntity:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: Unprocessable entity. Check the 'detail' field in response for details.
    numbers_NotFoundResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: The requested resource doesn't exist.
    InventoryCoverageResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/InventoryCoverage'
                type: array
              meta:
                $ref: '#/components/schemas/InventoryCoverageMetadata'
            type: object
      description: Successful response with a list of inventory coverage levels
    numbers_GenericErrorResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: Unexpected error
    numbers_BadRequestResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: Bad request, the request was unacceptable, often due to missing a required parameter.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    branded-calling_bearerAuth:
      description: API key passed as a Bearer token in the Authorization header
      scheme: bearer
      type: http
    oauthClientAuth:
      description: OAuth 2.0 authentication for Telnyx API and MCP integrations
      flows:
        authorizationCode:
          authorizationUrl: https://api.telnyx.com/v2/oauth/authorize
          refreshUrl: https://api.telnyx.com/v2/oauth/token
          scopes:
            admin: Administrative access to Telnyx resources
          tokenUrl: https://api.telnyx.com/v2/oauth/token
        clientCredentials:
          scopes:
            admin: Administrative access to Telnyx resources
          tokenUrl: https://api.telnyx.com/v2/oauth/token
      type: oauth2
    outbound-voice-profiles_bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http
    pronunciation-dicts_bearerAuth:
      description: Telnyx API v2 key. Obtain from https://portal.telnyx.com
      scheme: bearer
      type: http
    stored-payment-transactions_bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http