ThunderPhone Voip Connections API

The voip-connections API from ThunderPhone — 12 operation(s) for voip-connections.

GitHub OpenAPI

Operations 15

GET /v1/voip-connections Voip connections list #
POST /v1/voip-connections Voip connections create #
POST /v1/voip-connections/suggest-name Voip connections suggest name create #
GET /v1/voip-connections/sip-host Voip connections sip host list #
POST /v1/voip-connections/test Voip connections test create #
POST /v1/voip-connections/twilio/subaccounts Voip connections twilio subaccounts #
POST /v1/voip-connections/twilio/subaccounts/connect Voip connections twilio subaccounts connect #
GET /v1/voip-connections/{connection_id} Voip connections retrieve #
PATCH /v1/voip-connections/{connection_id} Voip connections partial update #
DELETE /v1/voip-connections/{connection_id} Voip connections delete #
POST /v1/voip-connections/{connection_id}/enable-transfers Voip connections enable transfers #
GET /v1/voip-connections/{connection_id}/available-numbers Voip connections available numbers list #
POST /v1/voip-connections/{connection_id}/import-numbers Voip connections import numbers #
GET /v1/voip-connections/{connection_id}/search-numbers Voip connections search numbers list #
POST /v1/voip-connections/{connection_id}/provision-number Voip connections provision number #

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/thunderphone-com:thunderphone-com-voip-connections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

thunderphone-com-voip-connections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ThunderPhone Voip Connections API
  version: 1.0.0
  description: Programmatic access to the ThunderPhone platform — agents, phone numbers, calls, billing, webhooks, and more. See https://thunderphone.com/docs and https://thunderphone.com/developers for the reference, tutorials and migration guides.
  contact:
    name: ThunderPhone support
    url: https://thunderphone.com/docs
servers:
- url: https://api.thunderphone.com
  description: Production
tags:
- name: voip-connections
paths:
  /v1/voip-connections:
    get:
      operationId: voip_connections_list
      description: Retrieve voip connections. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VoipConnection'
          description: ''
      summary: Voip connections list
      x-summary-source: derived
    post:
      operationId: voip_connections_create
      description: Create or run voip connections. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipConnectionCreateRequest'
        required: true
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoipConnection'
          description: ''
      summary: Voip connections create
      x-summary-source: derived
  /v1/voip-connections/suggest-name:
    post:
      operationId: voip_connections_suggest_name_create
      description: Create or run voip connections / suggest name. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipConnectionSuggestNameRequest'
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionNameSuggestion'
          description: ''
      summary: Voip connections suggest name create
      x-summary-source: derived
  /v1/voip-connections/sip-host:
    get:
      operationId: voip_connections_sip_host_list
      description: Return the SIP host a manual connection's trunk must send inbound calls to. ``sip_host`` is a bare hostname (no scheme or port), or null when inbound SIP is not configured in this environment.
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoipSipHost'
          description: ''
      summary: Voip connections sip host list
      x-summary-source: derived
  /v1/voip-connections/test:
    post:
      operationId: voip_connections_test_create
      description: Create or run voip connections / test. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipConnectionTestRequest'
        required: true
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionTest'
          description: ''
      summary: Voip connections test create
      x-summary-source: derived
  /v1/voip-connections/twilio/subaccounts:
    post:
      operationId: voip_connections_twilio_subaccounts
      description: List the active subaccounts under a Twilio parent account. The response carries SIDs and names only. Each subaccount's auth token is parked in a ``VoipSubaccountDiscovery`` row and referenced by ``discovery_id``; ``VoipTwilioSubaccountConnectView`` reads it back from there so tokens never round-trip through the browser.
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipTwilioSubaccountDiscoverRequest'
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwilioSubaccountDiscovery'
          description: ''
      summary: Voip connections twilio subaccounts
      x-summary-source: derived
  /v1/voip-connections/twilio/subaccounts/connect:
    post:
      operationId: voip_connections_twilio_subaccounts_connect
      description: Create one ordinary Twilio connection per chosen subaccount. Every SID is handled on its own — its own verification evidence, trunk, connection row and transaction — so one bad subaccount reports ``failed`` without touching the others, and the discovery row stays valid until it expires so the failed SID can simply be sent again.
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipTwilioSubaccountConnectRequest'
        required: true
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwilioSubaccountConnectResults'
          description: ''
      summary: Voip connections twilio subaccounts connect
      x-summary-source: derived
  /v1/voip-connections/{connection_id}:
    get:
      operationId: voip_connections_retrieve
      description: Retrieve voip connections. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoipConnection'
          description: ''
      summary: Voip connections retrieve
      x-summary-source: derived
    patch:
      operationId: voip_connections_partial_update
      description: Update voip connections. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedVoipConnectionUpdateRequest'
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoipConnection'
          description: ''
      summary: Voip connections partial update
      x-summary-source: derived
    delete:
      operationId: voip_connections_delete
      description: Delete voip connections. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '204':
          description: No response body
      summary: Voip connections delete
      x-summary-source: derived
  /v1/voip-connections/{connection_id}/enable-transfers:
    post:
      operationId: voip_connections_enable_transfers
      description: Turn call transfers on at the carrier for one connection. A carrier that refuses SIP REFER leaves ThunderPhone bridging transferred calls itself (billed per minute). For Twilio this sets the trunk's transfer setting through the customer's own account; other providers get a 409 with what to change on their side (see ``transfers``).
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoipConnection'
          description: ''
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
      summary: Voip connections enable transfers
      x-summary-source: derived
  /v1/voip-connections/{connection_id}/available-numbers:
    get:
      operationId: voip_connections_available_numbers_list
      description: Retrieve voip connections / available numbers. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
          description: ''
      summary: Voip connections available numbers list
      x-summary-source: derived
  /v1/voip-connections/{connection_id}/import-numbers:
    post:
      operationId: voip_connections_import_numbers
      description: Create or run voip connections / import numbers. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipNumberImportRequest'
        required: true
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportedNumbers'
          description: ''
      summary: Voip connections import numbers
      x-summary-source: derived
  /v1/voip-connections/{connection_id}/search-numbers:
    get:
      operationId: voip_connections_search_numbers_list
      description: Retrieve voip connections / search numbers. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: query
        name: area_code
        schema:
          type: string
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      - in: query
        name: country
        schema:
          type: string
        required: true
      - in: query
        name: type
        schema:
          type: string
          enum:
          - local
          - toll-free
        required: true
      tags:
      - voip-connections
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailableNumbers'
          description: ''
      summary: Voip connections search numbers list
      x-summary-source: derived
  /v1/voip-connections/{connection_id}/provision-number:
    post:
      operationId: voip_connections_provision_number
      description: Create or run voip connections / provision number. Parameters and returned fields are described below; organization-scoped resources use the organization associated with the authenticated credential. See https://thunderphone.com/docs for usage and access requirements.
      parameters:
      - in: path
        name: connection_id
        schema:
          type: integer
        required: true
      tags:
      - voip-connections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoipNumberProvisionRequest'
        required: true
      security:
      - bearerAuth: []
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvisionedNumber'
          description: ''
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvisionedNumber'
          description: ''
      summary: Voip connections provision number
      x-summary-source: derived
components:
  schemas:
    ProviderEnum:
      enum:
      - twilio
      - telnyx
      - signalwire
      - vonage
      - manual
      type: string
      description: '* `twilio` - Twilio

        * `telnyx` - Telnyx

        * `signalwire` - SignalWire

        * `vonage` - Vonage

        * `manual` - Manual'
    VoipTwilioSubaccountConnectRequest:
      type: object
      properties:
        discovery_id:
          type: string
          format: uuid
        subaccount_sids:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 64
          maxItems: 50
          minItems: 1
        enable_transfers:
          type: boolean
          default: false
          description: Also turn call transfers on for each new connection's SIP trunk. A failure does not fail that subaccount; it is reported in its test_result.transfer_enable_error.
      required:
      - discovery_id
      - subaccount_sids
    NumberSummary:
      type: object
      properties:
        id:
          type: integer
        number:
          type: string
        status:
          type: string
      required:
      - id
      - number
      - status
    VoipVerificationEvidence:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        provider:
          allOf:
          - $ref: '#/components/schemas/ProviderEnum'
          readOnly: true
        config_fingerprint:
          type: string
          readOnly: true
        inbound_status:
          allOf:
          - $ref: '#/components/schemas/InboundStatusEnum'
          readOnly: true
        outbound_status:
          allOf:
          - $ref: '#/components/schemas/OutboundStatusEnum'
          readOnly: true
        provider_charge_estimate_cents:
          type:
          - integer
          - 'null'
          readOnly: true
        provider_charge_currency:
          type: string
          readOnly: true
        provider_charge_note:
          type: string
          readOnly: true
        evidence:
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - config_fingerprint
      - created_at
      - evidence
      - id
      - inbound_status
      - outbound_status
      - provider
      - provider_charge_currency
      - provider_charge_estimate_cents
      - provider_charge_note
    OutboundStatusEnum:
      enum:
      - pass
      - fail
      type: string
      description: '* `pass` - Pass

        * `fail` - Fail'
    CallRoutingEnum:
      enum:
      - thunderphone
      - customer
      type: string
      description: '* `thunderphone` - thunderphone

        * `customer` - customer'
    TwilioSubaccountConnectResult:
      type: object
      properties:
        sid:
          type: string
        friendly_name:
          type:
          - string
          - 'null'
        status:
          $ref: '#/components/schemas/TwilioSubaccountConnectResultStatusEnum'
        connection:
          allOf:
          - $ref: '#/components/schemas/VoipConnection'
        error:
          type:
          - string
          - 'null'
      required:
      - connection
      - error
      - friendly_name
      - sid
      - status
    VoipNumberImportRequest:
      type: object
      properties:
        numbers:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 32
          maxItems: 50
          minItems: 1
        call_routing:
          allOf:
          - $ref: '#/components/schemas/CallRoutingEnum'
          default: thunderphone
          description: '`thunderphone` (default): point the numbers'' incoming calls at ThunderPhone in your Twilio or Telnyx account. `customer`: leave the numbers'' call settings at your carrier unchanged; your own call routing sends calls to each number''s SIP address when the agent should answer. Other connection types ignore it.


            * `thunderphone` - thunderphone

            * `customer` - customer'
        client_verifies:
          type: boolean
          default: false
          description: 'Imported numbers take calls once verified (one short test call each, billed by your carrier). `false` (default): ThunderPhone verifies each number itself, from a few minutes after the import (up to an hour for a large import); manual SIP numbers outside the US and Canada are left for you to verify, since their test is a call to themselves. `true`: you call `POST /v1/phone-numbers/{id}/verify-voip` for each number yourself right after; ThunderPhone calls only a number still unverified at least two hours after the import.'
      required:
      - numbers
    VoipConnection:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        provider:
          $ref: '#/components/schemas/ProviderEnum'
        status:
          allOf:
          - $ref: '#/components/schemas/VoipConnectionStatusEnum'
          readOnly: true
        setup_method:
          $ref: '#/components/schemas/SetupMethodEnum'
        inferred_name:
          type: boolean
          readOnly: true
        credentials:
          type: object
          additionalProperties: {}
          readOnly: true
        sip_config:
          type: object
          additionalProperties: {}
          readOnly: true
        test_result:
          readOnly: true
        last_tested_at:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
        numbers_imported:
          type: integer
          readOnly: true
        numbers_pending_verification:
          type: integer
          description: Numbers demoted by a routing change and not yet re-proven.
          readOnly: true
        provisioning_supported:
          type: boolean
          readOnly: true
        provisioning_message:
          type:
          - string
          - 'null'
          readOnly: true
        transfer_refused_at:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
        transfer_enabled_at:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
        relay:
          allOf:
          - $ref: '#/components/schemas/VoipRelayStatus'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - created_at
      - credentials
      - id
      - inferred_name
      - last_tested_at
      - name
      - numbers_imported
      - numbers_pending_verification
      - provider
      - provisioning_message
      - provisioning_supported
      - relay
      - sip_config
      - status
      - test_result
      - transfer_enabled_at
      - transfer_refused_at
      - updated_at
    AvailableNumbers:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            additionalProperties: {}
        provider_charge_note:
          type: string
      required:
      - provider_charge_note
      - results
    ConnectionTest:
      type: object
      properties:
        verification_evidence:
          $ref: '#/components/schemas/VoipVerificationEvidence'
        test_result:
          type: object
          additionalProperties: {}
        suggested_connection_name:
          type: string
        suggested_connection_name_inferred:
          type: boolean
      required:
      - suggested_connection_name
      - suggested_connection_name_inferred
      - test_result
      - verification_evidence
    VoipConnectionTestRequest:
      type: object
      properties:
        connection_id:
          type: integer
          minimum: 1
        provider:
          $ref: '#/components/schemas/ProviderEnum'
        credentials: {}
        external_account_handle:
          type: string
          minLength: 1
          description: 'Instead of credentials: the handle (ext_...) of a carrier account already saved with Zeus. ThunderPhone reads its key on the server; the key is never returned.'
          maxLength: 64
        sip_config: {}
        target_number:
          type: string
          maxLength: 32
      required:
      - provider
    ConnectionNameSuggestion:
      type: object
      properties:
        suggested_connection_name:
          type: string
        suggested_connection_name_inferred:
          type: boolean
      required:
      - suggested_connection_name
      - suggested_connection_name_inferred
    VoipConnectionCreateRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        provider:
          $ref: '#/components/schemas/ProviderEnum'
        setup_method:
          allOf:
          - $ref: '#/components/schemas/SetupMethodEnum'
          default: api_key
        credentials: {}
        external_account_handle:
          type: string
          minLength: 1
          description: 'Instead of credentials: the handle (ext_...) of a carrier account already saved with Zeus. ThunderPhone reads its key on the server; the key is never returned.'
          maxLength: 64
        sip_config: {}
        verification_evidence_id:
          type: string
          format: uuid
        enable_transfers:
          type: boolean
          default: false
          description: 'Twilio only: also turn call transfers on for the connection''s SIP trunk (TransferMode=enable-all), as POST /voip-connections/{id}/enable-transfers does. A failure does not fail the create; it is reported in test_result.transfer_enable_error.'
      required:
      - provider
      - verification_evidence_id
    VoipRelayStateEnum:
      enum:
      - registering
      - registered
      - refused
      - unreachable
      - evicted
      - relay_down
      - 'off'
      type: string
      description: '* `registering` - registering

        * `registered` - registered

        * `refused` - refused

        * `unreachable` - unreachable

        * `evicted` - evicted

        * `relay_down` - relay_down

        * `off` - off'
    VoipTwilioSubaccountDiscoverRequest:
      type: object
      description: 'Parent credentials to discover from, or an existing Twilio connection

        whose stored credentials stand in for them.'
      properties:
        connection_id:
          type: integer
          minimum: 1
        credentials: {}
    VoipConnectionSuggestNameRequest:
      type: object
      properties:
        connection_id:
          type: integer
          minimum: 1
        provider:
          $ref: '#/components/schemas/ProviderEnum'
        credentials: {}
        external_account_handle:
          type: string
          minLength: 1
          description: 'Instead of credentials: the handle (ext_...) of a carrier account already saved with Zeus. ThunderPhone reads its key on the server; the key is never returned.'
          maxLength: 64
    SetupMethodEnum:
      enum:
      - api_key
      - manual
      - guided_telnyx
      - twilio_subaccount
      type: string
      description: '* `api_key` - API key

        * `manual` - Manual

        * `guided_telnyx` - Guided Telnyx

        * `twilio_subaccount` - Twilio subaccount'
    PatchedVoipConnectionUpdateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        credentials: {}
        external_account_handle:
          type: string
          minLength: 1
          description: 'Instead of credentials: the handle (ext_...) of a carrier account already saved with Zeus. ThunderPhone reads its key on the server; the key is never returned.'
          maxLength: 64
        sip_config: {}
        verification_evidence_id:
          type: string
          format: uuid
    VoipRelayStatus:
      type: object
      description: 'Read-only: how ThunderPhone''s SIP registration relay is signed in to

        the connection''s carrier. Never credentials, the LiveKit login or the

        relay''s internal ids.'
      properties:
        state:
          $ref: '#/components/schemas/VoipRelayStateEnum'
        reason_code:
          type:
          - string
          - 'null'
          description: The carrier's SIP status or the relay's reason, for refused, unreachable and evicted only.
        since:
          type:
          - string
          - 'null'
          format: date-time
          description: When the connection entered this state.
        last_registered_at:
          type:
          - string
          - 'null'
          format: date-time
        relay_ip:
          type:
          - string
          - 'null'
          description: 'The relay''s public IP: added to the connection''s inbound allowlist by ThunderPhone, read-only.'
      required:
      - last_registered_at
      - reason_code
      - relay_ip
      - since
      - state
    ProvisionedNumber:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/NumberSummary'
        order_id:
          type:
          - string
          - 'null'
        order_status:
          type:
          - string
          - 'null'
        provider_charge_note:
          type: string
      required:
      - order_id
      - order_status
      - provider_charge_note
      - result
    TwilioSubaccountDiscovery:
      type: object
      properties:
        discovery_id:
          type: string
        parent:
          $ref: '#/components/schemas/TwilioSubaccountParent'
        subaccounts:
          type: array
          items:
            $ref: '#/components/schemas/TwilioSubaccount'
      required:
      - discovery_id
      - parent
      - subaccounts
    VoipNumberProvisionRequest:
      type: object
      properties:
        number:
          type: string
          minLength: 1
          maxLength: 32
        type:
          $ref: '#/components/schemas/VoipNumberProvisionTypeEnum'
        regulatory_id:
          type: string
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,64}$
      required:
      - number
    TwilioSubaccountParent:
      type: object
      properties:
        sid:
          type: string
        friendly_name:
          type: string
      required:
      - friendly_name
      - sid
    VoipConnectionStatusEnum:
      enum:
      - connected
      - error
      - pending
      - testing
      - draft
      type: string
      description: '* `connected` - Connected

        * `error` - Error

        * `pending` - Pending

        * `testing` - Testing

        * `draft` - Draft'
    TwilioSubaccountConnectResults:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/TwilioSubaccountConnectResult'
      required:
      - results
    TwilioSubaccountConnectResultStatusEnum:
      enum:
      - created
      - skipped
      - failed
      type: string
      description: '* `created` - created

        * `skipped` - skipped

        * `failed` - failed'
    InboundStatusEnum:
      enum:
      - pass
      - fail
      type: string
      description: '* `pass` - Pass

        * `fail` - Fail'
    VoipNumberProvisionTypeEnum:
      enum:
      - local
      - toll-free
      - mobile
      - national
      type: string
      description: '* `local` - local

        * `toll-free` - toll-free

        * `mobile` - mobile

        * `national` - national'
    TwilioSubaccount:
      type: object
      properties:
        sid:
          type: string
        friendly_name:
          type: string
        already_connected:
          type: boolean
        connection_id:
          type:
          - integer
          - 'null'
      required:
      - already_connected
      - connection_id
      - friendly_name
      - sid
    VoipSipHost:
      type: object
      properties:
        sip_host:
          type:
          - string
          - 'null'
      required:
      - sip_host
    ImportedNumbers:
      type: object
      properties:
        imported_count:
          type: integer
        provider_charge_estimate_cents:
          type: integer
        provider_charge_note:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/NumberSummary'
      required:
      - imported_count
      - provider_charge_estimate_cents
      - provider_charge_note
      - results
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_live_…
      description: 'Organization API key. Send Authorization: Bearer sk_live_…; create a key in the dashboard.'
    humanToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Human session token: Authorization: Token <session-token>. Organization API keys are rejected by key-management and account-control operations.'
x-mcp-server: https://api.thunderphone.com/v1/mcp