Telnyx Requirement Types API

Types of requirements for international numbers and porting orders

OpenAPI Specification

telnyx-requirement-types-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 Requirement Types 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: Types of requirements for international numbers and porting orders
  name: Requirement Types
paths:
  /requirement_types:
    get:
      description: List all requirement types ordered by created_at descending
      operationId: ListRequirementTypes
      parameters:
      - $ref: '#/components/parameters/FilterRequirementTypesConsolidated'
      - $ref: '#/components/parameters/SortRequirementTypesConsolidated'
      responses:
        '200':
          $ref: '#/components/responses/DocReqsListRequirementTypesResponse'
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/documents_Errors'
          description: Unprocessable entity. Check the 'detail' field in response for details.
        default:
          $ref: '#/components/responses/documents_GenericErrorResponse'
      summary: List all requirement types
      tags:
      - Requirement Types
      x-latency-category: responsive
  /requirement_types/{id}:
    get:
      description: Retrieve a requirement type by id
      operationId: RetrieveRequirementType
      parameters:
      - $ref: '#/components/parameters/DocReqsRequirementTypeId'
      responses:
        '200':
          $ref: '#/components/responses/DocReqsRequirementTypeResponse'
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/documents_Errors'
          description: Unprocessable entity. Check the 'detail' field in response for details.
        default:
          $ref: '#/components/responses/documents_GenericErrorResponse'
      summary: Retrieve a requirement types
      tags:
      - Requirement Types
      x-latency-category: responsive
components:
  schemas:
    documents_Errors:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/documents_Error'
          type: array
      type: object
    DocReqsRequirementType:
      properties:
        acceptance_criteria:
          description: Specifies objective criteria for acceptance
          properties:
            acceptable_characters:
              description: Specifies the allowed characters as a string
              example: abcdef0123456789
              readOnly: false
              type: string
            acceptable_values:
              description: Specifies the list of strictly possible values for the requirement. Ignored when empty
              items:
                example: US
                type: string
              readOnly: false
              type: array
            locality_limit:
              description: Specifies geography-based acceptance criteria
              example: Issued by the same country that the phone number belongs to
              readOnly: false
              type: string
            max_length:
              description: Maximum length allowed for the value
              example: 20
              readOnly: false
              type: integer
            min_length:
              description: Minimum length allowed for the value
              example: 16
              readOnly: false
              type: integer
            time_limit:
              description: Specifies time-based acceptance criteria
              example: Current and not expired
              readOnly: false
              type: string
          type: object
        created_at:
          description: ISO 8601 formatted date-time indicating when the resource was created.
          example: '2021-04-09T22:25:27.521Z'
          readOnly: true
          type: string
        description:
          description: Describes the requirement type
          example: Proves the customer has a physical address in the same locality as the phone number
          readOnly: false
          type: string
        example:
          description: Provides one or more examples of acceptable documents
          example: Utility bill, internet bill, phone bill, or lease
          readOnly: false
          type: string
        id:
          description: Identifies the associated document
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
          format: uuid
          readOnly: true
          type: string
        name:
          description: A short descriptive name for this requirement_type
          example: Proof of Address
          readOnly: true
          type: string
        record_type:
          description: Identifies the type of the resource
          example: requirement_type
          readOnly: true
          type: string
        type:
          description: Defines the type of this requirement type
          enum:
          - document
          - address
          - textual
          example: document
          readOnly: false
          type: string
        updated_at:
          description: ISO 8601 formatted date-time indicating when the resource was last updated.
          example: '2021-04-12T20:20:20.020Z'
          readOnly: true
          type: string
      type: object
    PaginationMeta:
      properties:
        page_number:
          example: 2
          type: integer
        page_size:
          example: 25
          type: integer
        total_pages:
          example: 3
          type: integer
        total_results:
          example: 55
          type: integer
      type: object
    documents_Error:
      properties:
        code:
          type: string
        detail:
          type: string
        meta:
          additionalProperties: true
          type: object
        source:
          properties:
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
          type: object
        title:
          type: string
      required:
      - code
      - title
      type: object
    DocReqsRequirementTypeList:
      items:
        $ref: '#/components/schemas/DocReqsRequirementType'
      type: array
  responses:
    DocReqsListRequirementTypesResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/DocReqsRequirementTypeList'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
            type: object
      description: Successful response
    documents_GenericErrorResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/documents_Errors'
      description: Unexpected error
    DocReqsRequirementTypeResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/DocReqsRequirementType'
            type: object
      description: Successful response
  parameters:
    DocReqsRequirementTypeId:
      description: Uniquely identifies the requirement_type record
      example: a38c217a-8019-48f8-bff6-0fdd9939075b
      in: path
      name: id
      required: true
      schema:
        format: uuid
        type: string
    FilterRequirementTypesConsolidated:
      description: 'Consolidated filter parameter for requirement types (deepObject style). Originally: filter[name]'
      explode: true
      in: query
      name: filter
      required: false
      schema:
        additionalProperties: false
        properties:
          name:
            additionalProperties: false
            properties:
              contains:
                description: Filters requirement types to those whose name contains a certain string.
                example: utility bill
                type: string
            type: object
        type: object
      style: deepObject
    SortRequirementTypesConsolidated:
      description: 'Consolidated sort parameter for requirement types (deepObject style). Originally: sort[]'
      in: query
      name: sort
      required: false
      schema:
        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.
        example:
        - name
        items:
          enum:
          - name
          - created_at
          - updated_at
          - -name
          - -created_at
          - -updated_at
          type: string
        type: array
  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