> ## Documentation Index
> Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List SIP trunks API

> List your SIP trunks via GET /trunk/trunks, each with its gateways, carrier IPs, numbers, health and active calls.



## OpenAPI

````yaml GET /trunk/trunks
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: >-
      Bring-your-own-carrier SIP trunks, their gateways, carrier IPs and
      numbers.
paths:
  /trunk/trunks:
    get:
      tags:
        - SIP trunks
      description: >
        Lists your SIP trunks, oldest first. Each trunk carries its gateways,
        carrier IPs and numbers, plus its live `health` and `active_calls`.
        Deleted trunks are not returned.


        Trunks belong to your organisation and are shared by its members. A
        sub-account API key lists only the trunks created under that
        sub-account.
      responses:
        '200':
          description: Your SIP trunks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkList'
        '403':
          description: The sub-account belongs to no organisation, so it has no trunks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkMessageError'
              example:
                message: a sub-account outside an organisation has no trunks
components:
  schemas:
    TrunkList:
      type: object
      properties:
        trunks:
          type: array
          items:
            $ref: '#/components/schemas/Trunk'
    TrunkMessageError:
      type: object
      description: >-
        Error body for `400`, `403` and `404` responses from the SIP trunk
        endpoints.
      required:
        - message
      properties:
        message:
          type: string
          description: >-
            Human-readable reason. On a `404` it names the ID that was not
            found.
    Trunk:
      description: A SIP trunk with its gateways, carrier IPs, numbers and live status.
      allOf:
        - $ref: '#/components/schemas/TrunkSettings'
        - type: object
          properties:
            health:
              type: string
              enum:
                - ready
                - waiting_for_carrier
                - degraded
                - disabled
              description: >
                - `ready`: calls have crossed the trunk and the carrier is not
                failing them.

                - `waiting_for_carrier`: no call has crossed the trunk yet.

                - `degraded`: the carrier failed three or more recent outbound
                calls with no answered call since.

                - `disabled`: `is_active` is `false`.
            active_calls:
              type: integer
              description: Calls holding one of the trunk's channels right now.
              example: 0
            gateways:
              type: array
              description: Carrier SIP hosts outbound calls are sent to.
              items:
                $ref: '#/components/schemas/TrunkGateway'
            ip_acls:
              type: array
              description: Carrier IPs inbound calls are accepted from.
              items:
                $ref: '#/components/schemas/TrunkCarrierIp'
            numbers:
              type: array
              description: The trunk's phone numbers, oldest first.
              items:
                $ref: '#/components/schemas/TrunkNumber'
      example:
        id: 3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21
        name: Telnyx production
        description: null
        preset: telnyx
        is_active: true
        inbound_enabled: true
        outbound_enabled: true
        channels: 20
        default_inbound_agent_id: null
        auth_username: bolna-outbound
        transport: udp
        codecs: PCMU,PCMA
        outbound_leading_plus_enabled: true
        last_inbound_at: null
        last_outbound_at: null
        converted_from_byot_trunk_id: null
        organization_id: 7a1c2e3f-4b5d-4c6e-8f90-a1b2c3d4e5f6
        sub_account_id: null
        user_id: null
        created_at: '2026-10-16T09:12:44.512381+00:00'
        updated_at: '2026-10-16T09:12:44.512381+00:00'
        is_deleted: false
        deleted_at: null
        health: waiting_for_carrier
        active_calls: 0
        gateways:
          - id: 8b1d4e2f-0a3c-4d5e-9f60-7182a3b4c5d6
            trunk_id: 3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21
            host: sip.example.com
            resolved_ips:
              - 203.0.113.30
            port: 5060
            priority: 0
            created_at: '2026-10-16T09:12:44.512381+00:00'
            updated_at: '2026-10-16T09:12:44.512381+00:00'
            is_deleted: false
            deleted_at: null
        ip_acls:
          - id: c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f
            trunk_id: 3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21
            cidr: 203.0.113.10/32
            created_at: '2026-10-16T09:12:44.512381+00:00'
            updated_at: '2026-10-16T09:12:44.512381+00:00'
            is_deleted: false
            deleted_at: null
          - id: d3e4f5a6-b7c8-4d9e-8f01-2b3c4d5e6f7a
            trunk_id: 3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21
            cidr: 198.51.100.0/28
            created_at: '2026-10-16T09:12:44.512381+00:00'
            updated_at: '2026-10-16T09:12:44.512381+00:00'
            is_deleted: false
            deleted_at: null
        numbers: []
    TrunkSettings:
      type: object
      description: A SIP trunk's own settings.
      properties:
        id:
          type: string
          format: uuid
          description: Unique trunk ID.
          example: 3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21
        name:
          type: string
          description: Display name.
          example: Telnyx production
        description:
          type: string
          nullable: true
          description: Free-text note for your own reference.
        preset:
          type: string
          nullable: true
          enum:
            - plivo
            - telnyx
            - twilio
            - exotel
            - vobiz
            - vonage
            - custom
          description: The carrier the trunk was set up for.
          example: telnyx
        is_active:
          type: boolean
          description: >-
            When `false`, the trunk takes no inbound calls and places no
            outbound calls.
        inbound_enabled:
          type: boolean
          description: Whether the trunk accepts inbound calls from its carrier IPs.
        outbound_enabled:
          type: boolean
          description: Whether outbound calls can be placed from the trunk's numbers.
        channels:
          type: integer
          description: >-
            Maximum concurrent calls on the trunk, inbound and outbound
            combined.
          example: 20
        default_inbound_agent_id:
          type: string
          nullable: true
          description: >-
            Agent that answers inbound calls to any of the trunk's numbers that
            has no `agent_id` of its own.
        auth_username:
          type: string
          nullable: true
          description: >-
            Username your carrier issued, sent when the carrier challenges an
            outbound call (SIP 401/407). The password is never returned.
          example: bolna-outbound
        transport:
          type: string
          enum:
            - udp
            - tcp
          description: SIP transport used towards your carrier's gateways.
        codecs:
          type: string
          description: >-
            Codecs offered to the carrier, comma-separated, in order of
            preference.
          example: PCMU,PCMA
        outbound_leading_plus_enabled:
          type: boolean
          description: >-
            When `true`, the dialled number is sent to the carrier with a
            leading `+` (`+12025550178`); when `false`, as digits only
            (`12025550178`).
        last_inbound_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the trunk last took an inbound call, updated at most once a
            minute. `null` until the first one.
        last_outbound_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When an outbound call was last placed through the trunk, updated at
            most once a minute. `null` until the first one.
        converted_from_byot_trunk_id:
          type: string
          nullable: true
          description: >-
            The legacy SIP trunk this trunk was migrated from, when Bolna
            migrated it for you. `null` otherwise.
        organization_id:
          type: string
          nullable: true
          description: >-
            The organisation that owns the trunk. `null` for an account outside
            an organisation.
        sub_account_id:
          type: string
          nullable: true
          description: >-
            The sub-account the trunk was created under. `null` for an
            organisation-level trunk.
        user_id:
          type: string
          nullable: true
          description: >-
            The owning user, for an account outside an organisation. `null` for
            an organisation's trunk.
        created_at:
          type: string
          format: date-time
          description: When the trunk was created.
        updated_at:
          type: string
          format: date-time
          description: When the trunk's settings last changed.
        is_deleted:
          type: boolean
          description: '`true` only in the response to a delete.'
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: When the trunk was deleted.
    TrunkGateway:
      type: object
      properties:
        id:
          type: string
          format: uuid
        trunk_id:
          type: string
          format: uuid
        host:
          type: string
          example: sip.example.com
        resolved_ips:
          type: array
          nullable: true
          items:
            type: string
          description: The public IPv4 addresses `host` resolved to when it was saved.
          example:
            - 203.0.113.30
        port:
          type: integer
          example: 5060
        priority:
          type: integer
          example: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_deleted:
          type: boolean
        deleted_at:
          type: string
          format: date-time
          nullable: true
    TrunkCarrierIp:
      type: object
      properties:
        id:
          type: string
          format: uuid
        trunk_id:
          type: string
          format: uuid
        cidr:
          type: string
          description: The range as stored, always with a prefix length.
          example: 198.51.100.0/28
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_deleted:
          type: boolean
        deleted_at:
          type: string
          format: date-time
          nullable: true
    TrunkNumber:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9
        trunk_id:
          type: string
          format: uuid
          example: 3f2b8c1e-6d4a-4f7b-9e2c-1a5d7b9c0e21
        e164:
          type: string
          example: '+12025550143'
        destination_key:
          type: string
          example: '12025550143'
        agent_id:
          type: string
          nullable: true
          description: >-
            Agent that answers inbound calls to this number. When `null`, the
            trunk's `default_inbound_agent_id` answers.
          example: 123e4567-e89b-12d3-a456-426614174000
        last_inbound_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When this number last took an inbound call, updated at most once a
            minute.
        last_outbound_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When an outbound call was last placed from this number, updated at
            most once a minute.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_deleted:
          type: boolean
        deleted_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.