> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get calling routing for a phone number

> Retrieve the routing connection currently stored for a BYON (Bring Your Own Number) phone number: the connection that inbound WhatsApp calls to the number are delivered to.

Use it to check the result of `PATCH /whatsapp/phone_numbers/{id}/calling_routing`. A read made immediately after an update can still return the previous value.

Sub-users need read permission on connections.



## OpenAPI

````yaml /openapi/source/external/legacy-published/whatsapp/management.json get /whatsapp/phone_numbers/{id}/calling_routing
openapi: 3.1.0
info:
  contact:
    email: support@telnyx.com
  description: >
    API for managing WhatsApp Business Accounts (WABAs), phone numbers, and
    message templates.


    Use these endpoints to:

    - List and manage WhatsApp Business Accounts

    - Configure phone numbers for WhatsApp

    - Create and manage message templates

    - Set up webhook configurations
  title: Telnyx WhatsApp Management API
  version: 2.0.0
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /whatsapp/phone_numbers/{id}/calling_routing:
    get:
      tags:
        - Whatsapp Phone Numbers
      summary: Get calling routing for a phone number
      description: >-
        Retrieve the routing connection currently stored for a BYON (Bring Your
        Own Number) phone number: the connection that inbound WhatsApp calls to
        the number are delivered to.


        Use it to check the result of `PATCH
        /whatsapp/phone_numbers/{id}/calling_routing`. A read made immediately
        after an update can still return the previous value.


        Sub-users need read permission on connections.
      operationId: getWhatsappCallingRouting
      parameters:
        - $ref: '#/components/parameters/WhatsappCallingRoutingNumber'
      responses:
        '200':
          description: >-
            The stored routing connection. `connection_id` is `null` when no
            connection is routed, and also when the stored target is not a
            connection in the account, including a connection too new to have
            propagated yet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WhatsappCallingRoutingData'
                required:
                  - data
              examples:
                routed:
                  summary: Number routed to a connection
                  value:
                    data:
                      record_type: whatsapp_calling_routing
                      phone_number: '+13125550100'
                      connection_id: '1234567890'
                not_routed:
                  summary: No routing connection
                  value:
                    data:
                      record_type: whatsapp_calling_routing
                      phone_number: '+13125550100'
                      connection_id: null
        '403':
          description: >-
            The caller is not permitted to perform this action. Sub-users need
            read permission on connections.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging_Errors'
              example:
                errors:
                  - code: '10010'
                    title: Authorization failed
                    detail: >-
                      You do not have permission to perform the requested action
                      on the specified resource or resources.
        '404':
          description: >-
            The account has no WhatsApp Calling number with this phone number,
            or the requesting account could not be found. A number just enabled
            for WhatsApp Calling returns 404 until it is provisioned, so retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging_Errors'
              example:
                errors:
                  - code: '10003'
                    title: Resource not found
                    detail: The requested resource or URL could not be found.
        '422':
          description: The phone number is not valid. Errors are keyed by field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappCallingRoutingFieldErrors'
              examples:
                invalid_phone_number:
                  summary: Phone number is not valid E.164
                  value:
                    errors:
                      phone_number:
                        - is not a valid E.164 phone number
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse'
components:
  parameters:
    WhatsappCallingRoutingNumber:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: The BYON phone number in E.164 format. The leading `+` is optional.
      example: '+13125550100'
  schemas:
    WhatsappCallingRoutingData:
      type: object
      properties:
        record_type:
          type: string
          enum:
            - whatsapp_calling_routing
          description: Identifies the type of the resource.
          example: whatsapp_calling_routing
        phone_number:
          type: string
          description: Phone number in E.164 format, with a leading `+`.
          example: '+13125550100'
        connection_id:
          type:
            - string
            - 'null'
          description: ID of the routing connection, or `null` when none is set.
          example: '1234567890'
      required:
        - record_type
        - phone_number
        - connection_id
    messaging_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/messaging_Error'
    WhatsappCallingRoutingFieldErrors:
      type: object
      properties:
        errors:
          type: object
          description: Error messages keyed by the field or step that failed.
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - errors
    messaging_Error:
      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
  responses:
    messaging_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/messaging_Errors'
          example:
            errors:
              - code: string
                title: string
                detail: string
                source:
                  pointer: /data/attributes/phone_number
                  parameter: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````