Telnyx Hosted Numbers API

Manage your messaging hosted numbers

GitHub OpenAPI
Business capability
SMS & Messaging Apps AE-150.20

Operations 9

GET /messaging_hosted_number_orders List messaging hosted number orders #
POST /messaging_hosted_number_orders Create a messaging hosted number order #
POST /messaging_hosted_number_orders/eligibility_numbers_check Check hosted messaging eligibility #
DELETE /messaging_hosted_number_orders/{id} Delete a messaging hosted number order #
GET /messaging_hosted_number_orders/{id} Retrieve a messaging hosted number order #
POST /messaging_hosted_number_orders/{id}/actions/file_upload Upload hosted number document #
POST /messaging_hosted_number_orders/{id}/validation_codes Validate hosted number codes #
POST /messaging_hosted_number_orders/{id}/verification_codes Create hosted number verification codes #
DELETE /messaging_hosted_numbers/{id} Delete a messaging hosted 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/telnyx:telnyx-hosted-numbers-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

telnyx-hosted-numbers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Telnyx Hosted Numbers API
  version: 2.0.0
  contact:
    email: support@telnyx.com
  x-endpoint-cost: light
  x-refined-note:
  - x-latency-category differs across the merged source definitions and was not carried
  description: 'Operations tagged Hosted Numbers across 3 of this provider''s published API definitions: telnyx-openapi.json, telnyx-openapi.yml, telnyx-openapi_2.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.telnyx.com/v2
  description: Version 2.0.0 of the Telnyx API
security:
- bearerAuth: []
tags:
- name: Hosted Numbers
  description: Manage your messaging hosted numbers
paths:
  /messaging_hosted_number_orders:
    get:
      summary: List messaging hosted number orders
      operationId: ListMessagingHostedNumberOrders
      tags:
      - Hosted Numbers
      x-group-parameters: 'true'
      parameters:
      - $ref: '#/components/parameters/PageConsolidated'
      responses:
        '200':
          description: Successful response with a list of messaging hosted number orders.
          content:
            application/json:
              schema:
                type: object
                title: List Messaging Hosted Number Order Response
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MessagingHostedNumberOrder'
                  meta:
                    $ref: '#/components/schemas/messaging_PaginationMeta_0b38e7044b'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
      description: Returns hosted-messaging orders for the authenticated account. Apply the documented filters and pagination parameters to narrow the result set.
    post:
      summary: Create a messaging hosted number order
      operationId: CreateMessagingHostedNumberOrder
      tags:
      - Hosted Numbers
      requestBody:
        description: Message payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessagingHostedNumberOrderRequest'
      responses:
        '200':
          description: Successful response with details about a messaging hosted number order.
          content:
            application/json:
              schema:
                type: object
                title: Retrieve Messaging Hosted Number Order Response
                properties:
                  data:
                    $ref: '#/components/schemas/MessagingHostedNumberOrder'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
      description: Creates an order to enable Telnyx messaging on phone numbers whose voice service remains with another carrier.
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
  /messaging_hosted_number_orders/eligibility_numbers_check:
    post:
      summary: Check hosted messaging eligibility
      operationId: CheckEligibilityNumbers
      tags:
      - Hosted Numbers
      requestBody:
        description: Phone numbers to check eligibility
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EligibilityNumbersRequest'
            example:
              phone_numbers:
              - string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EligibilityNumbersResponse'
              example:
                phone_numbers:
                - detail: string
                  phone_number: string
                  eligible: false
                  eligible_status: NUMBER_CAN_NOT_BE_REPEATED
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging_Error_0b38e7044b'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging_Error_0b38e7044b'
      description: Checks whether the supplied phone numbers are eligible for hosted messaging before an order is created.
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
  /messaging_hosted_number_orders/{id}:
    delete:
      summary: Delete a messaging hosted number order
      description: Delete a messaging hosted number order and all associated phone numbers.
      operationId: DeleteMessagingHostedNumberOrder
      tags:
      - Hosted Numbers
      parameters:
      - name: id
        in: path
        description: Identifies the messaging hosted number order to delete.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response with details about a messaging hosted number order.
          content:
            application/json:
              schema:
                type: object
                title: Retrieve Messaging Hosted Number Order Response
                properties:
                  data:
                    $ref: '#/components/schemas/MessagingHostedNumberOrder'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
    get:
      summary: Retrieve a messaging hosted number order
      operationId: GetMessagingHostedNumberOrder
      tags:
      - Hosted Numbers
      parameters:
      - name: id
        in: path
        description: Identifies the type of resource.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response with details about a messaging hosted number order.
          content:
            application/json:
              schema:
                type: object
                title: Retrieve Messaging Hosted Number Order Response
                properties:
                  data:
                    $ref: '#/components/schemas/MessagingHostedNumberOrder'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
      description: Returns the current state, phone numbers, and required actions for the specified hosted-messaging order.
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
  /messaging_hosted_number_orders/{id}/actions/file_upload:
    post:
      summary: Upload hosted number document
      operationId: UploadMessagingHostedNumberOrderFile
      tags:
      - Hosted Numbers
      parameters:
      - name: id
        in: path
        description: Identifies the type of resource.
        required: true
        schema:
          type: string
      requestBody:
        description: Message payload
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadFileMessagingHostedNumberOrderRequest'
            encoding:
              loa:
                contentType: application/pdf
              bill:
                contentType: application/pdf
      responses:
        '200':
          description: Successful response with details about a messaging hosted number order.
          content:
            application/json:
              schema:
                type: object
                title: Retrieve Messaging Hosted Number Order Response
                properties:
                  data:
                    $ref: '#/components/schemas/MessagingHostedNumberOrder'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
      description: Uploads a supporting document to the specified hosted-messaging order.
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
  /messaging_hosted_number_orders/{id}/validation_codes:
    post:
      summary: Validate hosted number codes
      description: Validate the verification codes sent to the numbers of the hosted order. The verification codes must be created in the verification codes endpoint.
      operationId: ValidateVerificationCodesForMessagingHostedNumberOrder
      tags:
      - Hosted Numbers
      parameters:
      - name: id
        in: path
        description: Order ID related to the validation codes.
        required: true
        schema:
          type: string
      requestBody:
        description: Message payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidationCodesRequest'
            example:
              verification_codes:
              - phone_number: string
                code: string
      responses:
        '200':
          description: Successful response with the phone numbers and their respective status of the validation codes.
          content:
            application/json:
              schema:
                type: object
                title: Retrieve Messaging Hosted Number Response
                properties:
                  data:
                    $ref: '#/components/schemas/ValidationCodes'
              example:
                data:
                  phone_numbers:
                  - phone_number: string
                    status: verified
                  order_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
  /messaging_hosted_number_orders/{id}/verification_codes:
    post:
      summary: Create hosted number verification codes
      description: Create verification codes to validate numbers of the hosted order. The verification codes will be sent to the numbers of the hosted order.
      operationId: CreateVerificationCodesForMessagingHostedNumberOrder
      tags:
      - Hosted Numbers
      parameters:
      - name: id
        in: path
        description: Order ID to have a verification code created.
        required: true
        schema:
          type: string
      requestBody:
        description: Message payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationCodesRequest'
            example:
              phone_numbers:
              - string
              verification_method: sms
      responses:
        '200':
          description: Verification codes created and sent to the phone numbers of the hosted order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedVerificationCodesResponse'
              example:
                data:
                - phone_number: string
                  verification_code_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  type: sms
                  error: string
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
  /messaging_hosted_numbers/{id}:
    delete:
      summary: Delete a messaging hosted number
      operationId: DeleteMessagingHostedNumber
      tags:
      - Hosted Numbers
      parameters:
      - name: id
        in: path
        description: Identifies the type of resource.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response with details about a messaging hosted number order.
          content:
            application/json:
              schema:
                type: object
                title: Retrieve Messaging Hosted Number Order Response
                properties:
                  data:
                    $ref: '#/components/schemas/MessagingHostedNumberOrder'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse_0b38e7044b'
      description: Removes the specified hosted number from Telnyx messaging management.
    servers:
    - url: https://api.telnyx.com/v2
      description: Version 2.0.0 of the Telnyx API
components:
  schemas:
    EligibilityNumbersResponse:
      type: object
      properties:
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/EligibilityNumberResponse'
          description: List of phone numbers with their eligibility status.
    HostedNumber:
      example:
        record_type: messaging_hosted_number
        id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c
        phone_number: '+18665550001'
        status: successful
      type: object
      properties:
        record_type:
          type: string
          example: messaging_hosted_number
        id:
          type: string
          format: uuid
          description: Identifies the type of resource.
          readOnly: true
        phone_number:
          type: string
          x-format: +E.164
          description: The messaging hosted phone number (+E.164 format)
        status:
          type: string
          enum:
          - deleted
          - failed
          - failed_activation
          - failed_carrier_rejected
          - failed_ineligible_carrier
          - failed_number_already_hosted
          - failed_number_not_found
          - failed_ownership_verification
          - failed_timeout
          - pending
          - provisioning
          - successful
    ValidationCodes:
      type: object
      properties:
        phone_numbers:
          type: array
          items:
            type: object
            properties:
              phone_number:
                type: string
                x-format: +E.164
              status:
                type: string
                enum:
                - verified
                - rejected
                - already_verified
            required:
            - phone_number
            - status
        order_id:
          type: string
          format: uuid
      required:
      - phone_numbers
      - order_id
    ValidationCodesRequest:
      type: object
      properties:
        verification_codes:
          type: array
          items:
            type: object
            properties:
              phone_number:
                type: string
                x-format: +E.164
              code:
                type: string
            required:
            - phone_number
            - code
      required:
      - verification_codes
    CreatedVerificationCodesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            title: VerificationCodeResult
            description: Verification code result response
            required:
            - phone_number
            properties:
              phone_number:
                type: string
                x-format: +E.164
                description: Phone number for which the verification code was created
              verification_code_id:
                type: string
                format: uuid
                description: Unique identifier for the verification code
              type:
                type: string
                enum:
                - sms
                - call
                description: Type of verification method used
              error:
                type: string
                description: Error message describing why the verification code creation failed
      required:
      - data
    messaging_Error_0b38e7044b:
      required:
      - code
      - title
      properties:
        code:
          type: string
          x-format: integer
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
    messaging_Errors_0b38e7044b:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/messaging_Error_0b38e7044b'
    EligibilityNumberResponse:
      type: object
      properties:
        detail:
          type: string
          description: Detailed information about the eligibility status.
        phone_number:
          type: string
          description: The phone number in e164 format.
        eligible:
          type: boolean
          description: Whether the phone number is eligible for hosted messaging.
        eligible_status:
          type: string
          description: The eligibility status of the phone number.
          enum:
          - NUMBER_CAN_NOT_BE_REPEATED
          - NUMBER_CAN_NOT_BE_VALIDATED
          - NUMBER_CAN_NOT_BE_WIRELESS
          - NUMBER_CAN_NOT_BE_ACTIVE_IN_YOUR_ACCOUNT
          - NUMBER_CAN_NOT_HOSTED_WITH_A_TELNYX_SUBSCRIBER
          - NUMBER_CAN_NOT_BE_IN_TELNYX
          - NUMBER_IS_NOT_A_US_NUMBER
          - NUMBER_IS_NOT_A_VALID_ROUTING_NUMBER
          - NUMBER_IS_NOT_IN_E164_FORMAT
          - BILLING_ACCOUNT_CHECK_FAILED
          - BILLING_ACCOUNT_IS_ABOLISHED
          - ELIGIBLE
    VerificationCodesRequest:
      type: object
      properties:
        phone_numbers:
          type: array
          items:
            type: string
            x-format: +E.164
        verification_method:
          type: string
          enum:
          - sms
          - call
      required:
      - phone_numbers
      - verification_method
    UploadFileMessagingHostedNumberOrderRequest:
      type: object
      example:
        loa: example loa
        bill: bill example
      properties:
        loa:
          type: string
          format: binary
          description: Must be a signed LOA for the numbers in the order in PDF format.
        bill:
          type: string
          format: binary
          description: Must be the last month's bill with proof of ownership of all of the numbers in the order in PDF format.
    MessagingHostedNumberOrder:
      type: object
      example:
        id: 86f58db9-0fe3-4adc-9d1f-46e66e6e9323
        record_type: messaging_hosted_number_order
        messaging_profile_id: dc8f39ac-953d-4520-b93b-786ae87db0da
        status: pending
        phone_numbers:
        - record_type: messaging_hosted_number
          id: bf6307bd-884d-4c1f-b6ea-c62b8c495d3c
          phone_number: '+18665550001'
          status: pending
        - record_type: messaging_hosted_number
          id: 464bd54e-a328-4b11-a131-28e6793cb6f2
          phone_number: '+18665550002'
          status: pending
      properties:
        record_type:
          type: string
          example: messaging_hosted_number_order
          description: Identifies the type of the resource.
          readOnly: true
        id:
          type: string
          format: uuid
          description: Resource unique identifier.
          readOnly: true
        messaging_profile_id:
          type:
          - string
          - 'null'
          description: Automatically associate the number with this messaging profile ID when the order is complete.
        status:
          type: string
          enum:
          - carrier_rejected
          - compliance_review_failed
          - deleted
          - failed
          - incomplete_documentation
          - incorrect_billing_information
          - ineligible_carrier
          - loa_file_invalid
          - loa_file_successful
          - pending
          - provisioning
          - successful
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/HostedNumber'
    messaging_PaginationMeta_0b38e7044b:
      type: object
      required:
      - total_pages
      - total_results
      - page_size
      - page_number
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 55
        page_number:
          type: integer
          example: 2
        page_size:
          type: integer
          example: 25
    EligibilityNumbersRequest:
      type: object
      properties:
        phone_numbers:
          type: array
          items:
            type: string
            x-format: +E.164
            description: Phone number to check eligibility
          description: List of phone numbers to check eligibility
      required:
      - phone_numbers
    CreateMessagingHostedNumberOrderRequest:
      type: object
      example:
        messaging_profile_id: dc8f39ac-953d-4520-b93b-786ae87db0da
        phone_numbers:
        - '+18665550001'
        - '+18665550002'
      properties:
        phone_numbers:
          type: array
          items:
            type: string
            x-format: +E.164
          description: Phone numbers to be used for hosted messaging.
        messaging_profile_id:
          type: string
          description: Automatically associate the number with this messaging profile ID when the order is complete.
    messaging_Error:
      properties:
        code:
          type: string
          x-format: integer
        detail:
          type: string
        meta:
          type: object
        source:
          properties:
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              format: json-pointer
              type: string
          type: object
        title:
          type: string
      required:
      - code
      - title
    messaging_Errors:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/messaging_Error'
          type: array
    messaging_PaginationMeta:
      properties:
        page_number:
          example: 2
          type: integer
        page_size:
          example: 25
          type: integer
        total_pages:
          example: 3
          type: integer
        total_results:
          example: 55
          type: integer
      required:
      - total_pages
      - total_results
      - page_size
      - page_number
      type: object
  responses:
    messaging_GenericErrorResponse_0b38e7044b:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/messaging_Errors_0b38e7044b'
          example:
            errors:
            - code: string
              title: string
              detail: string
              source:
                pointer: /data/attributes/phone_number
                parameter: string
    MessagingHostedNumberOrderResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/MessagingHostedNumberOrder'
            title: Retrieve Messaging Hosted Number Order Response
            type: object
      description: Successful response with details about a messaging hosted number order.
    ListMessagingHostedNumberOrdersResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  $ref: '#/components/schemas/MessagingHostedNumberOrder'
                type: array
              meta:
                $ref: '#/components/schemas/messaging_PaginationMeta'
            title: List Messaging Hosted Number Order Response
            type: object
      description: Successful response with a list of messaging hosted number orders.
    messaging_GenericErrorResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/messaging_Errors'
      description: Unexpected error
    ValidationCodesResponse:
      content:
        application/json:
          schema:
            properties:
              data:
                $ref: '#/components/schemas/ValidationCodes'
            title: Retrieve Messaging Hosted Number Response
            type: object
      description: Successful response with the phone numbers and their respective status of the validation codes.
  parameters:
    PageConsolidated:
      name: page
      in: query
      style: deepObject
      explode: true
      description: 'Consolidated page parameter (deepObject style). Originally: page[number], page[size]'
      schema:
        type: object
        properties:
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load
          size:
            type: integer
            minimum: 1
            maximum: 250
            default: 20
            description: The size of the page
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Telnyx API key supplied as `Authorization: Bearer <token>`. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.'
    Payment:
      type: apiKey
      in: header
      name: Authorization
      description: 'Machine Payment Protocol credential used on paid retries, sent as `Authorization: Payment ...`. Obtained by paying a challenge returned in the `WWW-Authenticate` header of a 402 response. This is not a Telnyx API key; initial challenge requests use standard bearer authentication instead.'
    agent-memory_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key
    bearerAuth:
      type: http
      scheme: bearer
    branded-calling_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
    collections_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key. Collections and results are automatically scoped to the authenticated user's organization.
    number-reputation_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
    oauthClientAuth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.telnyx.com/v2/oauth/token
          scopes:
            admin: Administrative access to Telnyx resources
        authorizationCode:
          authorizationUrl: https://api.telnyx.com/v2/oauth/authorize
          tokenUrl: https://api.telnyx.com/v2/oauth/token
          refreshUrl: https://api.telnyx.com/v2/oauth/token
          scopes:
            admin: Administrative access to Telnyx resources
      description: OAuth 2.0 authentication for Telnyx API and MCP integrations
    outbound-voice-profiles_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    pronunciation-dicts_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API v2 key. Obtain from https://portal.telnyx.com
    rcs-registration_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
    stored-payment-transactions_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    transcriptions-search_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key. Results are automatically scoped to the authenticated user's organization.
    web-search_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key
    pay-connectors_bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key, not the processor bearer token.
    telnyxApiKey:
      type: http
      scheme: bearer
      description: Management-only Telnyx account credential.
x-refined-from:
- telnyx-openapi.json
- telnyx-openapi.yml
- telnyx-openapi_2.json
x-service-info:
  categories:
  - communication
  - developer-tools
  docs:
    apiReference: https://developers.telnyx.com
    homepage: https://telnyx.com
    llms: https://telnyx.com/llms.txt