Telnyx · Capability

Telnyx API — Phone Number Orders

Telnyx API — Phone Number Orders. 18 operations. Lead operation: Retrieve all comments. Self-contained Naftiko capability covering one Telnyx business surface.

Run with Naftiko TelnyxPhone Number Orders

What You Can Do

GET
Listcomments — Retrieve all comments
/v1/comments
POST
Createcomment — Create a comment
/v1/comments
GET
Retrievecomment — Retrieve a comment
/v1/comments/{id}
PATCH
Markcommentread — Mark a comment as read
/v1/comments/{id}/read
GET
Retrieveorderphonenumbers — Retrieve a list of phone numbers associated to orders
/v1/number-order-phone-numbers
GET
Getnumberorderphonenumber — Retrieve a single phone number within a number order.
/v1/number-order-phone-numbers/{number-order-phone-number-id}
PATCH
Updatenumberorderphonenumber — Update requirements for a single phone number within a number order.
/v1/number-order-phone-numbers/{number-order-phone-number-id}
GET
Listnumberorders — List number orders
/v1/number-orders
POST
Createnumberorder — Create a number order
/v1/number-orders
GET
Retrievenumberorder — Retrieve a number order
/v1/number-orders/{number-order-id}
PATCH
Updatenumberorder — Update a number order
/v1/number-orders/{number-order-id}
GET
Listsubnumberorders — List sub number orders
/v1/sub-number-orders
GET
Getsubnumberorder — Retrieve a sub number order
/v1/sub-number-orders/{sub-number-order-id}
PATCH
Updatesubnumberorder — Update a sub number order's requirements
/v1/sub-number-orders/{sub-number-order-id}
PATCH
Cancelsubnumberorder — Cancel a sub number order
/v1/sub-number-orders/{sub-number-order-id}/cancel
POST
Createsubnumberordersreport — Create a sub number orders report
/v1/sub-number-orders-report
GET
Getsubnumberordersreport — Retrieve a sub number orders report
/v1/sub-number-orders-report/{report-id}
GET
Downloadsubnumberordersreport — Download a sub number orders report
/v1/sub-number-orders-report/{report-id}/download

MCP Tools

retrieve-all-comments

Retrieve all comments

read-only idempotent
create-comment

Create a comment

retrieve-comment

Retrieve a comment

read-only idempotent
mark-comment-read

Mark a comment as read

idempotent
retrieve-list-phone-numbers-associated

Retrieve a list of phone numbers associated to orders

read-only idempotent
retrieve-single-phone-number-within

Retrieve a single phone number within a number order.

read-only idempotent
update-requirements-single-phone-number

Update requirements for a single phone number within a number order.

idempotent
list-number-orders

List number orders

read-only idempotent
create-number-order

Create a number order

retrieve-number-order

Retrieve a number order

read-only idempotent
update-number-order

Update a number order

idempotent
list-sub-number-orders

List sub number orders

read-only idempotent
retrieve-sub-number-order

Retrieve a sub number order

read-only idempotent
update-sub-number-order-s-requirements

Update a sub number order's requirements

idempotent
cancel-sub-number-order

Cancel a sub number order

idempotent
create-sub-number-orders-report

Create a sub number orders report

retrieve-sub-number-orders-report

Retrieve a sub number orders report

read-only idempotent
download-sub-number-orders-report

Download a sub number orders report

read-only idempotent

Capability Spec

telnyx-phone-number-orders.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Telnyx API — Phone Number Orders
  description: 'Telnyx API — Phone Number Orders. 18 operations. Lead operation: Retrieve all comments. Self-contained Naftiko
    capability covering one Telnyx business surface.'
  tags:
  - Telnyx
  - Phone Number Orders
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TELNYX_API_KEY: TELNYX_API_KEY
capability:
  consumes:
  - type: http
    namespace: telnyx-phone-number-orders
    baseUri: https://api.telnyx.com/v2
    description: Telnyx API — Phone Number Orders business capability. Self-contained, no shared references.
    resources:
    - name: comments
      path: /comments
      operations:
      - name: listcomments
        method: GET
        description: Retrieve all comments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: filter
          in: query
          type: object
          description: 'Consolidated filter parameter (deepObject style). Originally: filter[comment_record_type], filter[comment_record_id]'
      - name: createcomment
        method: POST
        description: Create a comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: comments-id
      path: /comments/{id}
      operations:
      - name: retrievecomment
        method: GET
        description: Retrieve a comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The comment ID.
          required: true
    - name: comments-id-read
      path: /comments/{id}/read
      operations:
      - name: markcommentread
        method: PATCH
        description: Mark a comment as read
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The comment ID.
          required: true
    - name: number_order_phone_numbers
      path: /number_order_phone_numbers
      operations:
      - name: retrieveorderphonenumbers
        method: GET
        description: Retrieve a list of phone numbers associated to orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: filter
          in: query
          type: object
          description: 'Consolidated filter parameter (deepObject style). Originally: filter[country_code]'
    - name: number_order_phone_numbers-number_order_phone_number_id
      path: /number_order_phone_numbers/{number_order_phone_number_id}
      operations:
      - name: getnumberorderphonenumber
        method: GET
        description: Retrieve a single phone number within a number order.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: number_order_phone_number_id
          in: path
          type: string
          description: The number order phone number ID.
          required: true
      - name: updatenumberorderphonenumber
        method: PATCH
        description: Update requirements for a single phone number within a number order.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: number_order_phone_number_id
          in: path
          type: string
          description: The number order phone number ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: number_orders
      path: /number_orders
      operations:
      - name: listnumberorders
        method: GET
        description: List number orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: filter
          in: query
          type: object
          description: 'Consolidated filter parameter (deepObject style). Originally: filter[status], filter[created_at],
            filter[phone_numbers_count], filter[customer_reference], filte'
      - name: createnumberorder
        method: POST
        description: Create a number order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: number_orders-number_order_id
      path: /number_orders/{number_order_id}
      operations:
      - name: retrievenumberorder
        method: GET
        description: Retrieve a number order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: number_order_id
          in: path
          type: string
          description: The number order ID.
          required: true
      - name: updatenumberorder
        method: PATCH
        description: Update a number order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: number_order_id
          in: path
          type: string
          description: The number order ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: sub_number_orders
      path: /sub_number_orders
      operations:
      - name: listsubnumberorders
        method: GET
        description: List sub number orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: filter
          in: query
          type: object
          description: 'Consolidated filter parameter (deepObject style). Originally: filter[status], filter[order_request_id],
            filter[country_code], filter[phone_number_type], filter['
    - name: sub_number_orders-sub_number_order_id
      path: /sub_number_orders/{sub_number_order_id}
      operations:
      - name: getsubnumberorder
        method: GET
        description: Retrieve a sub number order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sub_number_order_id
          in: path
          type: string
          description: The sub number order ID.
          required: true
        - name: filter
          in: query
          type: object
          description: 'Consolidated filter parameter (deepObject style). Originally: filter[include_phone_numbers]'
      - name: updatesubnumberorder
        method: PATCH
        description: Update a sub number order's requirements
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sub_number_order_id
          in: path
          type: string
          description: The sub number order ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: sub_number_orders-sub_number_order_id-cancel
      path: /sub_number_orders/{sub_number_order_id}/cancel
      operations:
      - name: cancelsubnumberorder
        method: PATCH
        description: Cancel a sub number order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sub_number_order_id
          in: path
          type: string
          description: The ID of the sub number order.
          required: true
    - name: sub_number_orders_report
      path: /sub_number_orders_report
      operations:
      - name: createsubnumberordersreport
        method: POST
        description: Create a sub number orders report
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: sub_number_orders_report-report_id
      path: /sub_number_orders_report/{report_id}
      operations:
      - name: getsubnumberordersreport
        method: GET
        description: Retrieve a sub number orders report
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: report_id
          in: path
          type: string
          description: The unique identifier of the sub number orders report
          required: true
    - name: sub_number_orders_report-report_id-download
      path: /sub_number_orders_report/{report_id}/download
      operations:
      - name: downloadsubnumberordersreport
        method: GET
        description: Download a sub number orders report
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: report_id
          in: path
          type: string
          description: The unique identifier of the sub number orders report
          required: true
    authentication:
      type: bearer
      token: '{{env.TELNYX_API_KEY}}'
  exposes:
  - type: rest
    namespace: telnyx-phone-number-orders-rest
    port: 8080
    description: REST adapter for Telnyx API — Phone Number Orders. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/comments
      name: comments
      description: REST surface for comments.
      operations:
      - method: GET
        name: listcomments
        description: Retrieve all comments
        call: telnyx-phone-number-orders.listcomments
        with:
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcomment
        description: Create a comment
        call: telnyx-phone-number-orders.createcomment
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/comments/{id}
      name: comments-id
      description: REST surface for comments-id.
      operations:
      - method: GET
        name: retrievecomment
        description: Retrieve a comment
        call: telnyx-phone-number-orders.retrievecomment
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/comments/{id}/read
      name: comments-id-read
      description: REST surface for comments-id-read.
      operations:
      - method: PATCH
        name: markcommentread
        description: Mark a comment as read
        call: telnyx-phone-number-orders.markcommentread
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/number-order-phone-numbers
      name: number-order-phone-numbers
      description: REST surface for number_order_phone_numbers.
      operations:
      - method: GET
        name: retrieveorderphonenumbers
        description: Retrieve a list of phone numbers associated to orders
        call: telnyx-phone-number-orders.retrieveorderphonenumbers
        with:
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/number-order-phone-numbers/{number-order-phone-number-id}
      name: number-order-phone-numbers-number-order-phone-number-id
      description: REST surface for number_order_phone_numbers-number_order_phone_number_id.
      operations:
      - method: GET
        name: getnumberorderphonenumber
        description: Retrieve a single phone number within a number order.
        call: telnyx-phone-number-orders.getnumberorderphonenumber
        with:
          number_order_phone_number_id: rest.number_order_phone_number_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatenumberorderphonenumber
        description: Update requirements for a single phone number within a number order.
        call: telnyx-phone-number-orders.updatenumberorderphonenumber
        with:
          number_order_phone_number_id: rest.number_order_phone_number_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/number-orders
      name: number-orders
      description: REST surface for number_orders.
      operations:
      - method: GET
        name: listnumberorders
        description: List number orders
        call: telnyx-phone-number-orders.listnumberorders
        with:
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createnumberorder
        description: Create a number order
        call: telnyx-phone-number-orders.createnumberorder
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/number-orders/{number-order-id}
      name: number-orders-number-order-id
      description: REST surface for number_orders-number_order_id.
      operations:
      - method: GET
        name: retrievenumberorder
        description: Retrieve a number order
        call: telnyx-phone-number-orders.retrievenumberorder
        with:
          number_order_id: rest.number_order_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatenumberorder
        description: Update a number order
        call: telnyx-phone-number-orders.updatenumberorder
        with:
          number_order_id: rest.number_order_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sub-number-orders
      name: sub-number-orders
      description: REST surface for sub_number_orders.
      operations:
      - method: GET
        name: listsubnumberorders
        description: List sub number orders
        call: telnyx-phone-number-orders.listsubnumberorders
        with:
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sub-number-orders/{sub-number-order-id}
      name: sub-number-orders-sub-number-order-id
      description: REST surface for sub_number_orders-sub_number_order_id.
      operations:
      - method: GET
        name: getsubnumberorder
        description: Retrieve a sub number order
        call: telnyx-phone-number-orders.getsubnumberorder
        with:
          sub_number_order_id: rest.sub_number_order_id
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatesubnumberorder
        description: Update a sub number order's requirements
        call: telnyx-phone-number-orders.updatesubnumberorder
        with:
          sub_number_order_id: rest.sub_number_order_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sub-number-orders/{sub-number-order-id}/cancel
      name: sub-number-orders-sub-number-order-id-cancel
      description: REST surface for sub_number_orders-sub_number_order_id-cancel.
      operations:
      - method: PATCH
        name: cancelsubnumberorder
        description: Cancel a sub number order
        call: telnyx-phone-number-orders.cancelsubnumberorder
        with:
          sub_number_order_id: rest.sub_number_order_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sub-number-orders-report
      name: sub-number-orders-report
      description: REST surface for sub_number_orders_report.
      operations:
      - method: POST
        name: createsubnumberordersreport
        description: Create a sub number orders report
        call: telnyx-phone-number-orders.createsubnumberordersreport
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sub-number-orders-report/{report-id}
      name: sub-number-orders-report-report-id
      description: REST surface for sub_number_orders_report-report_id.
      operations:
      - method: GET
        name: getsubnumberordersreport
        description: Retrieve a sub number orders report
        call: telnyx-phone-number-orders.getsubnumberordersreport
        with:
          report_id: rest.report_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sub-number-orders-report/{report-id}/download
      name: sub-number-orders-report-report-id-download
      description: REST surface for sub_number_orders_report-report_id-download.
      operations:
      - method: GET
        name: downloadsubnumberordersreport
        description: Download a sub number orders report
        call: telnyx-phone-number-orders.downloadsubnumberordersreport
        with:
          report_id: rest.report_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: telnyx-phone-number-orders-mcp
    port: 9090
    transport: http
    description: MCP adapter for Telnyx API — Phone Number Orders. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: retrieve-all-comments
      description: Retrieve all comments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.listcomments
      with:
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: create-comment
      description: Create a comment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: telnyx-phone-number-orders.createcomment
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-comment
      description: Retrieve a comment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.retrievecomment
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: mark-comment-read
      description: Mark a comment as read
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.markcommentread
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-list-phone-numbers-associated
      description: Retrieve a list of phone numbers associated to orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.retrieveorderphonenumbers
      with:
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-single-phone-number-within
      description: Retrieve a single phone number within a number order.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.getnumberorderphonenumber
      with:
        number_order_phone_number_id: tools.number_order_phone_number_id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-requirements-single-phone-number
      description: Update requirements for a single phone number within a number order.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.updatenumberorderphonenumber
      with:
        number_order_phone_number_id: tools.number_order_phone_number_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-number-orders
      description: List number orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.listnumberorders
      with:
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: create-number-order
      description: Create a number order
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: telnyx-phone-number-orders.createnumberorder
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-number-order
      description: Retrieve a number order
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.retrievenumberorder
      with:
        number_order_id: tools.number_order_id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-number-order
      description: Update a number order
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.updatenumberorder
      with:
        number_order_id: tools.number_order_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-sub-number-orders
      description: List sub number orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.listsubnumberorders
      with:
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-sub-number-order
      description: Retrieve a sub number order
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.getsubnumberorder
      with:
        sub_number_order_id: tools.sub_number_order_id
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: update-sub-number-order-s-requirements
      description: Update a sub number order's requirements
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.updatesubnumberorder
      with:
        sub_number_order_id: tools.sub_number_order_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: cancel-sub-number-order
      description: Cancel a sub number order
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.cancelsubnumberorder
      with:
        sub_number_order_id: tools.sub_number_order_id
      outputParameters:
      - type: object
        mapping: $.
    - name: create-sub-number-orders-report
      description: Create a sub number orders report
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: telnyx-phone-number-orders.createsubnumberordersreport
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-sub-number-orders-report
      description: Retrieve a sub number orders report
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.getsubnumberordersreport
      with:
        report_id: tools.report_id
      outputParameters:
      - type: object
        mapping: $.
    - name: download-sub-number-orders-report
      description: Download a sub number orders report
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: telnyx-phone-number-orders.downloadsubnumberordersreport
      with:
        report_id: tools.report_id
      outputParameters:
      - type: object
        mapping: $.