CallNode SIP Trunks API

Create, list, update, and delete saved SIP trunks (egress BYOC + ingress).

GitHub OpenAPI

Operations 6

GET /api/v1/trunks List your SIP trunks #
POST /api/v1/trunks Create a SIP trunk #
GET /api/v1/trunks/{id} Retrieve a trunk #
PATCH /api/v1/trunks/{id} Update a trunk #
DELETE /api/v1/trunks/{id} Delete a trunk #
POST /api/v1/trunks/{id}/rotate-credentials Rotate a registration trunk's SIP password #

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/callnode-io:callnode-io-sip-trunks-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

callnode-io-sip-trunks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Callnode Io SIP Trunks API
  version: 1.0.0
  description: 'Operations tagged SIP Trunks across 2 of this provider''s published API definitions: callnode-openapi.yaml, callnode-io-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.callnode.io
  description: Production
security:
- ApiKeyAuth: []
  TimestampAuth: []
  SignatureAuth: []
tags:
- name: SIP Trunks
  description: Create, list, update, and delete saved SIP trunks (egress BYOC + ingress).
paths:
  /api/v1/trunks:
    get:
      tags:
      - SIP Trunks
      summary: List your SIP trunks
      description: 'Returns your saved SIP trunks alongside account-level trunk settings —

        your plan''s included trunk count and additional-trunk fee, how many

        trunks are active, the egress source IP your endpoints must allow, and

        the ingress endpoint your PBX/SBC points at.'
      operationId: listSipTrunks
      responses:
        '200':
          description: Your trunks and account trunk settings.
          content:
            application/json:
              schema:
                type: object
                properties:
                  trunks:
                    type: array
                    items:
                      $ref: '#/components/schemas/SipTrunk'
                  includedSipTrunks:
                    type: integer
                    description: Trunks included with your plan at no additional charge.
                  additionalTrunkMonthlyFee:
                    type: number
                    description: Your plan's monthly fee for each trunk beyond the included count.
                  activeTrunkCount:
                    type: integer
                  egressSourceIp:
                    type: string
                    description: The first switch address CallNode originates SIP egress from (kept for older integrations). Allow every address in egressSourceIps.
                    example: 198.27.122.194
                  egressSourceIps:
                    type: array
                    items:
                      type: string
                    description: Every address CallNode may originate SIP egress from; a call can leave from any of them. Allow all of them on your endpoints.
                    example:
                    - 198.27.122.194
                    - 192.95.44.47
                  ingressEndpoint:
                    type: string
                    description: Where an IP-authenticated PBX/SBC sends inbound trunk calls (UDP/TCP).
                    example: sip.callnode.io:5062
                  registrationEndpoint:
                    type: string
                    description: Where a registration trunk registers and sends calls (TLS only).
                    example: sip.callnode.io:5061
                  sipRealm:
                    type: string
                    description: SIP domain/realm used for registration trunk credentials.
                    example: sip.callnode.io
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      tags:
      - SIP Trunks
      summary: Create a SIP trunk
      description: 'Creates a saved trunk. A trunk can be egress (outbound BYOC delivery to

        your SIP host), ingress (accept inbound calls from your PBX/SBC), or

        both — you must supply an `egressHost` and/or one or more `allowedIps`.


        Requires a verified (KYC) account. Trunks beyond your plan''s included

        count incur your plan''s additional-trunk monthly fee: the first attempt

        returns `402 monthly_fee_confirmation_required`; re-submit with

        `confirmMonthlyFee: true` to acknowledge the fee and create the trunk.'
      operationId: createSipTrunk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTrunkRequest'
            examples:
              ingress:
                summary: Ingress trunk (inbound from your PBX)
                value:
                  name: HQ PBX
                  ingressEnabled: true
                  allowedIps:
                  - 203.0.113.10
                  - 203.0.113.11
                  defaultPhoneNumberId: cmpxeh9o60002pp4h7oznictb
              egress:
                summary: Egress trunk (outbound BYOC delivery)
                value:
                  name: Carrier egress
                  egressHost: sbc.yourcompany.com
                  egressPort: 5060
                  egressTransport: udp
      responses:
        '201':
          description: Trunk created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunk'
        '400':
          description: 'Failed validation. Codes: `invalid_name`, `invalid_port`,

            `unsupported_transport`, `blocked_destination` (egress host resolves

            to a private/reserved address), `invalid_allowed_ips`,

            `invalid_default_number`, or `no_config` (neither an egress host nor

            any ingress IPs were provided).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: '`monthly_fee_confirmation_required` — you are beyond your plan''s

            included trunks; re-submit with `confirmMonthlyFee: true`. Or

            `insufficient_balance` — not enough wallet balance for the fee.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '`account_not_verified` — trunk creation requires a verified (KYC) account.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '`duplicate_name` — you already have an active trunk with that name.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/trunks/{id}:
    parameters:
    - name: id
      in: path
      required: true
      description: The trunk's `id`.
      schema:
        type: string
        example: cmb1xk2p40001abcd1234wxyz
    get:
      tags:
      - SIP Trunks
      summary: Retrieve a trunk
      operationId: getSipTrunk
      responses:
        '200':
          description: The trunk.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunk'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
      - SIP Trunks
      summary: Update a trunk
      description: 'Updates any subset of a trunk''s fields. Send `egressHost` as `null` or

        `""` to clear it and make the trunk ingress-only. The same validation

        codes as create apply; a request with no recognized fields returns

        `400 no_fields`.'
      operationId: updateSipTrunk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTrunkRequest'
            example:
              status: disabled
              allowedIps:
              - 203.0.113.10
      responses:
        '200':
          description: The updated trunk.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunk'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
      - SIP Trunks
      summary: Delete a trunk
      description: 'Soft-deletes the trunk. The row is retained (renamed to free the name

        slot) for call-detail history and traceback. A trunk included in your

        plan (`monthlyFeeApplies: false`) can''t be deleted; disable it instead.'
      operationId: deleteSipTrunk
      responses:
        '200':
          description: Deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  id:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: '`included_in_plan` — the trunk is included in your plan and can''t be

            deleted; disable it with PATCH `{"status": "disabled"}` instead (it

            stays free). Or `trunk_in_use` — live numbers deliver to this trunk;

            repoint them first, or disable the trunk.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/trunks/{id}/rotate-credentials:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Trunk id.
    post:
      tags:
      - SIP Trunks
      summary: Rotate a registration trunk's SIP password
      description: 'Generates a new SIP password for a registration trunk, keeping the same

        username. This is the only recovery path for a lost password: CallNode

        stores a non-reversible digest, never the plaintext.


        The new password is returned **once**, in `sipPassword`. The previous

        password stops working within about a minute, so update your PBX

        promptly — it will need to re-register.'
      operationId: rotateSipTrunkCredentials
      responses:
        '200':
          description: New credentials. `sipPassword` appears only in this response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunk'
        '400':
          description: '`registration_not_enabled` — enable registration on the trunk first.

            '
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    servers:
    - url: https://api.callnode.io
      description: Production
components:
  schemas:
    SipTrunk:
      type: object
      description: A saved SIP trunk — egress (outbound BYOC), ingress (inbound from your PBX/SBC), or both.
      properties:
        id:
          type: string
          example: cmb1xk2p40001abcd1234wxyz
        name:
          type: string
          description: 1–64 characters. Unique across your active trunks.
        status:
          type: string
          enum:
          - active
          - disabled
        egressEnabled:
          type: boolean
          description: Whether outbound (BYOC) delivery to `egressHost` is enabled.
        egressHost:
          type:
          - string
          - 'null'
          description: Hostname or IP of your SIP endpoint for outbound delivery. Null for an ingress-only trunk.
        egressPort:
          type: integer
          default: 5060
        egressTransport:
          type: string
          enum:
          - udp
          - tcp
          - tls
        ingressEnabled:
          type: boolean
          description: Whether inbound calls from `allowedIps` are accepted.
        allowedIps:
          type: array
          description: Public IPv4 addresses your PBX/SBC sends from — the accepted ingress source IPs.
          items:
            type: string
        defaultPhoneNumberId:
          type:
          - string
          - 'null'
          description: The id of one of your numbers — the default agent for ingress calls that do not match one of your own DIDs.
        outboundCliNumberId:
          type:
          - string
          - 'null'
          description: The id of one of your numbers, presented as caller ID on outbound (termination) calls when the INVITE's From is not itself one of your numbers — the normal case for a registration trunk, whose From carries its auth username. A From that IS one of your live numbers always wins, so a multi-number PBX can still present per-call caller ID.
        monthlyFeeApplies:
          type: boolean
          description: True when this trunk is beyond your plan's included count and is billed the additional-trunk fee.
        nextBillingDate:
          type:
          - string
          - 'null'
          format: date-time
        registration:
          type: object
          description: 'Registration-trunk settings, for a PBX with no static public IP. Never

            contains the password or its digest.

            '
          properties:
            enabled:
              type: boolean
              description: Whether this trunk authenticates by registration rather than by source IP.
            username:
              type:
              - string
              - 'null'
              description: The SIP username your PBX registers with.
              example: cnk4m8xq2z7pd
            domain:
              type: string
              description: SIP domain / digest realm.
              example: sip.callnode.io
            server:
              type: string
              description: Host and port your PBX registers to.
              example: sip.callnode.io:5061
            transport:
              type: string
              enum:
              - tls
              description: Registration trunks are TLS-only.
            passwordSetAt:
              type:
              - string
              - 'null'
              format: date-time
            registered:
              type: boolean
              description: True when your PBX is registered right now.
            lastRegisteredAt:
              type:
              - string
              - 'null'
              format: date-time
            lastRegisteredIp:
              type:
              - string
              - 'null'
              description: The address your PBX last registered from.
        sipPassword:
          type: string
          description: 'Present ONLY on the response that mints it — creating a registration

            trunk, enabling registration, or rotating credentials. It cannot be

            retrieved afterwards; store it immediately.

            '
        sipPasswordNotice:
          type: string
          description: Human-readable reminder that accompanies `sipPassword`.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    UpdateTrunkRequest:
      type: object
      description: 'Any subset of the fields below. Send `egressHost` as `null` or `""` to

        clear it (ingress-only). A request with no recognized fields returns

        `no_fields`.

        '
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
        egressHost:
          type:
          - string
          - 'null'
          description: Null or empty string clears egress delivery.
        egressPort:
          type: integer
        egressTransport:
          type: string
          enum:
          - udp
          - tcp
          - tls
        status:
          type: string
          enum:
          - active
          - disabled
        egressEnabled:
          type: boolean
        allowedIps:
          type: array
          items:
            type: string
        ingressEnabled:
          type: boolean
        registrationEnabled:
          type: boolean
          description: 'Turning this on for the first time mints credentials and returns

            `sipPassword` once in the response. Turning it off keeps the

            credentials on file so re-enabling does not disturb a configured PBX.

            '
        defaultPhoneNumberId:
          type:
          - string
          - 'null'
        outboundCliNumberId:
          type:
          - string
          - 'null'
          description: Null clears the trunk-level outbound caller ID.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable machine-readable code, e.g. `invalid_from_number`.
        message:
          type: string
          description: Human-readable explanation.
        retryable:
          type: boolean
          description: Whether retrying the identical request could succeed.
      required:
      - error
      - message
    CreateTrunkRequest:
      type: object
      required:
      - name
      description: 'Provide `name` plus at least one direction''s config — an `egressHost`

        (egress), one or more `allowedIps` (IP-authenticated ingress), or

        `registrationEnabled: true` (registration ingress). A request with none

        of them is rejected with `no_config`.

        '
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
        egressHost:
          type: string
          description: Hostname or IP of your SIP endpoint. Setting it enables egress delivery. Must be a public host.
        egressPort:
          type: integer
          description: Defaults to 5060, or 5061 when `egressTransport` is `tls`.
          default: 5060
        egressTransport:
          type: string
          enum:
          - udp
          - tcp
          - tls
        allowedIps:
          type: array
          description: Public IPv4 source IPs for ingress.
          items:
            type: string
        ingressEnabled:
          type: boolean
        registrationEnabled:
          type: boolean
          description: 'Create a registration trunk for a PBX with no static public IP: your

            PBX registers to CallNode over TLS instead of being allow-listed by

            address, and calls we place to you go to whatever contact it last

            registered from. The response carries `sipPassword` once.

            '
        defaultPhoneNumberId:
          type: string
          description: One of your numbers' ids — the default ingress agent.
        outboundCliNumberId:
          type: string
          description: One of your numbers' ids — caller ID presented on termination calls when the From is not an owned number.
        confirmMonthlyFee:
          type: boolean
          description: Set true to acknowledge your plan's additional-trunk fee when you are beyond the included count.
  responses:
    BadRequest:
      description: Malformed request or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource on this account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, unknown, or badly signed credentials — check the HMAC and the timestamp skew.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Your API key, e.g. `cn_live_...`.
    TimestampAuth:
      type: apiKey
      in: header
      name: X-Timestamp
      description: Unix seconds as a string, used as the signature prefix.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-Signature
      description: '`hex(HMAC_SHA256(apiSecret, timestamp + "\n" + rawBody))`.'
x-refined-from:
- callnode-openapi.yaml
- callnode-io-openapi.yml