Telnyx Phone Number Orders API

Number orders

Operations 18

GET /comments Retrieve all comments #
POST /comments Create a comment #
GET /comments/{id} Retrieve a comment #
PATCH /comments/{id}/read Mark a comment as read #
GET /number_order_phone_numbers Retrieve a list of phone numbers associated to orders #
GET /number_order_phone_numbers/{number_order_phone_number_id} Retrieve a single phone number within a number order. #
PATCH /number_order_phone_numbers/{number_order_phone_number_id} Update requirements for a single phone number within a number order. #
GET /number_orders List number orders #
POST /number_orders Create a number order #
GET /number_orders/{number_order_id} Retrieve a number order #
PATCH /number_orders/{number_order_id} Update a number order #
GET /sub_number_orders List sub number orders #
GET /sub_number_orders/{sub_number_order_id} Retrieve a sub number order #
PATCH /sub_number_orders/{sub_number_order_id} Update a sub number order's requirements #
PATCH /sub_number_orders/{sub_number_order_id}/cancel Cancel a sub number order #
POST /sub_number_orders_report Create a sub number orders report #
GET /sub_number_orders_report/{report_id} Retrieve a sub number orders report #
GET /sub_number_orders_report/{report_id}/download Download a sub number orders report #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/telnyx-phone-number-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

telnyx-phone-number-orders-api-openapi.yml Raw ↑
openapi: 3.2.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 Phone Number Orders 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: Number orders
  name: Phone Number Orders
paths:
  /comments:
    get:
      operationId: ListComments
      parameters:
      - description: 'Consolidated filter parameter (deepObject style). Originally: filter[comment_record_type], filter[comment_record_id]'
        explode: true
        in: query
        name: filter
        schema:
          properties:
            comment_record_id:
              description: ID of the record the comments relate to
              example: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576
              type: string
            comment_record_type:
              description: Record type that the comment relates to
              enum:
              - sub_number_order
              - requirement_group
              example: sub_number_order
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          $ref: '#/components/responses/listCommentsResponse'
        '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: Retrieve all comments
      tags:
      - Phone Number Orders
      x-latency-category: responsive
    post:
      operationId: CreateComment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CommentResponse'
        '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 a comment
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /comments/{id}:
    get:
      operationId: RetrieveComment
      parameters:
      - description: The comment ID.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/CommentResponse'
        '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: Retrieve a comment
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /comments/{id}/read:
    patch:
      operationId: MarkCommentRead
      parameters:
      - description: The comment ID.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/ReadCommentResponse'
        '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: Mark a comment as read
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /number_order_phone_numbers:
    get:
      description: Get a list of phone numbers associated to orders.
      operationId: RetrieveOrderPhoneNumbers
      parameters:
      - description: 'Consolidated filter parameter (deepObject style). Originally: filter[country_code]'
        explode: true
        in: query
        name: filter
        schema:
          properties:
            country_code:
              description: Country code of the order phone number.
              example: US
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          $ref: '#/components/responses/ListNumberOrderPhoneNumbersResponse'
        '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: Retrieve a list of phone numbers associated to orders
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /number_order_phone_numbers/{number_order_phone_number_id}:
    get:
      description: Get an existing phone number in number order.
      operationId: GetNumberOrderPhoneNumber
      parameters:
      - description: The number order phone number ID.
        in: path
        name: number_order_phone_number_id
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/NumberOrderPhoneNumberResponse'
        '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: Retrieve a single phone number within a number order.
      tags:
      - Phone Number Orders
      x-latency-category: responsive
    patch:
      description: Updates requirements for a single phone number within a number order.
      operationId: UpdateNumberOrderPhoneNumber
      parameters:
      - description: The number order phone number ID.
        in: path
        name: number_order_phone_number_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNumberOrderPhoneNumberRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/NumberOrderPhoneNumberResponse'
        '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: Update requirements for a single phone number within a number order.
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /number_orders:
    get:
      description: Get a paginated list of number orders.
      operationId: ListNumberOrders
      parameters:
      - $ref: '#/components/parameters/numbers_PageConsolidated'
      - description: 'Consolidated filter parameter (deepObject style). Originally: filter[status], filter[created_at], filter[phone_numbers_count], filter[customer_reference], filter[requirements_met]'
        explode: true
        in: query
        name: filter
        schema:
          properties:
            created_at:
              additionalProperties: false
              description: Filter number orders by date range.
              properties:
                gt:
                  description: Filter number orders later than this value.
                  type: string
                lt:
                  description: Filter number orders earlier than this value.
                  type: string
              type: object
            customer_reference:
              description: Filter number orders via the customer reference set.
              type: string
            phone_numbers_count:
              description: Filter number order with this amount of numbers
              type: string
            requirements_met:
              description: Filter number orders by requirements met.
              type: boolean
            status:
              description: Filter number orders by status.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          $ref: '#/components/responses/ListNumberOrdersResponse'
        '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: List number orders
      tags:
      - Phone Number Orders
      x-endpoint-cost: medium
      x-group-parameters: 'true'
      x-latency-category: responsive
    post:
      description: Creates a phone number order.
      operationId: CreateNumberOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNumberOrderRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/NumberOrderResponse'
        '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 a number order
      tags:
      - Phone Number Orders
      x-endpoint-cost: heavy
      x-latency-category: responsive
  /number_orders/{number_order_id}:
    get:
      description: Get an existing phone number order.
      operationId: RetrieveNumberOrder
      parameters:
      - description: The number order ID.
        in: path
        name: number_order_id
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/NumberOrderResponse'
        '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: Retrieve a number order
      tags:
      - Phone Number Orders
      x-latency-category: responsive
    patch:
      description: Updates a phone number order.
      operationId: UpdateNumberOrder
      parameters:
      - description: The number order ID.
        in: path
        name: number_order_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNumberOrderRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/NumberOrderResponse'
        '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: Update a number order
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /sub_number_orders:
    get:
      description: Get a paginated list of sub number orders.
      operationId: ListSubNumberOrders
      parameters:
      - description: 'Consolidated filter parameter (deepObject style). Originally: filter[status], filter[order_request_id], filter[country_code], filter[phone_number_type], filter[phone_numbers_count]'
        explode: true
        in: query
        name: filter
        schema:
          properties:
            country_code:
              description: ISO alpha-2 country code.
              example: US
              type: string
            order_request_id:
              description: ID of the number order the sub number order belongs to
              example: 12ade33a-21c0-473b-b055-b3c836e1c293
              format: uuid
              type: string
            phone_number_type:
              description: Phone Number Type
              example: local
              type: string
            phone_numbers_count:
              description: Amount of numbers in the sub number order
              example: 1
              type: integer
            status:
              description: Filter sub number orders by status.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          $ref: '#/components/responses/ListSubNumberOrdersResponse'
        '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: List sub number orders
      tags:
      - Phone Number Orders
      x-group-parameters: 'true'
      x-latency-category: responsive
  /sub_number_orders/{sub_number_order_id}:
    get:
      description: Get an existing sub number order.
      operationId: GetSubNumberOrder
      parameters:
      - description: The sub number order ID.
        in: path
        name: sub_number_order_id
        required: true
        schema:
          type: string
      - description: 'Consolidated filter parameter (deepObject style). Originally: filter[include_phone_numbers]'
        explode: true
        in: query
        name: filter
        schema:
          properties:
            include_phone_numbers:
              default: false
              description: Include the first 50 phone number objects in the results
              type: boolean
          type: object
        style: deepObject
      responses:
        '200':
          $ref: '#/components/responses/SubNumberOrderResponse'
        '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: Retrieve a sub number order
      tags:
      - Phone Number Orders
      x-latency-category: responsive
    patch:
      description: Updates a sub number order.
      operationId: UpdateSubNumberOrder
      parameters:
      - description: The sub number order ID.
        in: path
        name: sub_number_order_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubNumberOrderRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/SubNumberOrderResponse'
        '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: Update a sub number order's requirements
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /sub_number_orders/{sub_number_order_id}/cancel:
    patch:
      description: Allows you to cancel a sub number order in 'pending' status.
      operationId: CancelSubNumberOrder
      parameters:
      - description: The ID of the sub number order.
        in: path
        name: sub_number_order_id
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/SubNumberOrderResponse'
        '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: Cancel a sub number order
      tags:
      - Phone Number Orders
      x-latency-category: responsive
  /sub_number_orders_report:
    post:
      description: Create a CSV report for sub number orders. The report will be generated asynchronously and can be downloaded once complete.
      operationId: CreateSubNumberOrdersReport
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubNumberOrdersReportRequest'
        required: false
      responses:
        '202':
          $ref: '#/components/responses/SubNumberOrdersReportResponse'
        '400':
          $ref: '#/components/responses/numbers_BadRequestResponse'
        '401':
          $ref: '#/components/responses/numbers_UnauthorizedResponse'
        '422':
          $ref: '#/components/responses/numbers_UnprocessableEntity'
        '500':
          $ref: '#/components/responses/numbers_GenericErrorResponse'
      summary: Create a sub number orders report
      tags:
      - Phone Number Orders
      x-endpoint-cost: medium
      x-latency-category: background
  /sub_number_orders_report/{report_id}:
    get:
      description: Get the status and details of a sub number orders report.
      operationId: GetSubNumberOrdersReport
      parameters:
      - description: The unique identifier of the sub number orders report
        example: 12ade33a-21c0-473b-b055-b3c836e1c293
        in: path
        name: report_id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '200':
          $ref: '#/components/responses/SubNumberOrdersReportResponse'
        '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: Retrieve a sub number orders report
      tags:
      - Phone Number Orders
      x-endpoint-cost: light
      x-latency-category: responsive
  /sub_number_orders_report/{report_id}/download:
    get:
      description: Download the CSV file for a completed sub number orders report. The report status must be 'success' before the file can be downloaded.
      operationId: DownloadSubNumberOrdersReport
      parameters:
      - description: The unique identifier of the sub number orders report
        example: 12ade33a-21c0-473b-b055-b3c836e1c293
        in: path
        name: report_id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '200':
          content:
            text/csv:
              example: 'id,order_request_id,is_block_sub_number_order,status,phone_number_type,requirements_met,phone_numbers_count,country_code,user_id,customer_reference,created_at,updated_at

                1758d6ed-61a0-4d7a-bf57-b5dced413d33,f486fc2c-4fdf-4849-930d-b3045373e839,False,success,local,True,1,US,0d7ef697-df19-413a-b724-56b0539f5397,STRING,2025-05-23 14:33:12.376686,2025-05-23 14:33:15.624916'
              schema:
                format: binary
                type: string
          description: CSV file download
        '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: Download a sub number orders report
      tags:
      - Phone Number Orders
      x-endpoint-cost: light
      x-latency-category: background
components:
  responses:
    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.
    SubNumberOrderResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/SubNumberOrder'
            title: Sub Number Order Response
            type: object
      description: Successful response with details about a sub number order.
    NumberOrderPhoneNumberResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/NumberOrderPhoneNumber'
            title: Number Order Phone Number Response
            type: object
      description: Successful response with details about a number order phone number.
    ListSubNumberOrdersResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/SubNumberOrder'
                type: array
              meta:
                $ref: '#/components/schemas/PaginationMeta'
            title: List Sub Number Orders Response
            type: object
      description: Successful response with a list of sub number orders.
    listCommentsResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/Comment'
                type: array
              meta:
                $ref: '#/components/schemas/PaginationMeta'
            type: object
      description: An array of Comment Responses
    ListNumberOrdersResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/NumberOrder'
                type: array
              meta:
                $ref: '#/components/schemas/PaginationMeta'
            title: List Number Orders Response
            type: object
      description: Successful response with a list of number orders.
    numbers_NotFoundResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: The requested resource doesn't exist.
    CommentResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                allOf:
                - $ref: '#/components/schemas/Comment'
                - type: object
            type: object
      description: A Comment Response
    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
    ListNumberOrderPhoneNumbersResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/NumberOrderPhoneNumber'
                type: array
              meta:
                $ref: '#/components/schemas/PaginationMeta'
            title: List Number Order Phone Numbers Response
            type: object
      description: Successful response with a list of number order phone numbers.
    ReadCommentResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                allOf:
                - $ref: '#/components/schemas/ReadComment'
                - type: object
            type: object
      description: A Comment Response
    numbers_GenericErrorResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: Unexpected error
    numbers_UnprocessableEntity:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
      description: Unprocessable entity. Check the 'detail' field in response for details.
    NumberOrderResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/NumberOrderWithPhoneNumbers'
            title: Number Order Response
            type: object
      description: Successful response with details about a number order.
    SubNumberOrdersReportResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/SubNumberOrdersReport'
            type: object
      description: Sub number orders report response
  schemas:
    UpdateNumberOrderRequest:
      properties:
        customer_reference:
          description: A customer reference string for customer look ups.
          example: MY REF 001
          type: string
        regulatory_requirements:
          items:
            $ref: '#/components/schemas/UpdateRegulatoryRequirement'
          type: array
      type: object
    SubNumberOrderRegulatoryRequirement:
      properties:
        field_type:
          enum:
          - textual
          - datetime
          - address
          - document
          example: address
          readOnly: true
          type: string
        record_type:
          example: phone_number_regulatory_requirement
          readOnly: true
          type: string
        requirement_id:
          description: Unique id for a requirement.
          example: 8ffb3622-7c6b-4ccc-b65f-7a3dc0099576
          format: uuid
          type: string
      type: object
    NumberOrderWithPhoneNumbers:
      properties:
        billing_group_id:
          description: Identifies the messaging profile associated with the phone number.
          example: abc85f64-5717-4562-b3fc-2c9600
          type: string
        connection_id:
          description: Identifies the connection associated with this phone number.
          example: '346789098765567'
          type: string
        created_at:
          description: An ISO 8901 datetime string denoting when the number order was created.
          example: '2018-01-01T00:00:00.000000Z'
          format: date-time
          readOnly: true
          type: string
        customer_reference:
          description: A customer reference string for customer look ups.
          example: MY REF 001
          type: string
        id:
          example: 12ade33a-21c0-473b-b055-b3c836e1c292
          format: uuid
          readOnly: true
          type: string
        messaging_profile_id:
          description: Identifies the messaging profile associated with the phone number.
          example: abc85f64-5717-4562-b3fc-2c9600
          type: string
        phone_numbers:
          items:
            $ref: '#/components/schemas/PhoneNumber'
            description: The unique phone numbers given as arguments in the job creation.
          type: array
        phone_numbers_count:
          description: The count of phone numbers in the number order.
          example: 1
          readOnly: true
          type: integer
        record_type:
          example: number_order
          readOnly: true
          type: string
        requirements_met:
          description: True if all requirements are met for every phone number, false otherwise.
          example: true
          readOnly: true
          type: boolean
        status:
          description: The status of the order.
          enum:
          - pending
          - success
          - failure
          readOnly: true
          type: string
        sub_number_orders_ids:
          items:
            type: string
          type: array
        updated_at:
          description: An ISO 8901 datetime string for when the number order was updated.
          example: '2018-01-01T00:00:00.000000Z'
          format: date-time
          readOnly: true
          type: string
      title: NumberOrder
      type: object
    CreateSubNumberOrdersReportRequest:
      example:
        country_code: US
        created_at_gt: '2023-04-05T10:22:08.230549Z'
        created_at_lt: '2025-06-05T10:22:08.230549Z'
        customer_reference: STRING
        order_request_id: 12ade33a-21c0-473b-b055-b3c836e1c293
        status: success
      properties:
        country_code:
          description: Filter by country code
          example: US
          type: string
        created_at_gt:
          description: Filter for orders created after this date
          example: '2023-04-05T10:22:08.230549Z'
          format: date-time
          type: string
        created_at_lt:
          description: Filter for orders created before this date
          example: '2025-06-05T10:22:08.230549Z'
          format: date-time
          type: string
        customer_reference:
          description: Filter by customer reference
          example: STRING
          type: string
        order_request_id:
          description: Filter by specific order request ID
          example: 12ade33a-21c0-473b-b055-b3c836e1c293
          format: uuid
          type: string
        status:
          description: Filter by order status
          enum:
          - pending
          - success
          - failure
          example: success
          type: string
      type: object
    PhoneNumber:
      example:
        bundle_id: bc8e4d67-33a0-4cbb-af74-7b58f05bd474
        id: dc8e4d67-33a0-4cbb-af74-7b58f05bd494
        phone_number: '+19705555098'
        record_type: number_order_phone_number
        regulatory_requirements:
        - field_type: a

# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/telnyx/refs/heads/main/openapi/telnyx-phone-number-orders-api-openapi.yml