CallNode Wholesale API

Wholesale (SBC-as-a-Service) DID ordering — US and international numbers delivered straight to your SIP endpoint. Requires wholesale to be active on your account and completed business verification; every endpoint otherwise returns 403. **Outbound PSTN termination is SIP, not HTTP.** Where it is enabled on your account you send us an INVITE on your trunk and we complete the call; there is no HTTP endpoint to call, so it is not described below. The rules that matter — the caller ID you may present, what each refusal code means, and how minutes are charged — are in the SIP trunking guide under "Wholesale outbound termination". Whether it is enabled on your account, and at what rate, is shown on your SBC Tenant page in the dashboard.

GitHub OpenAPI

Operations 5

GET /api/v1/wholesale/countries List wholesale countries #
GET /api/v1/wholesale/states List states/regions for a country #
GET /api/v1/wholesale/areas List areas (rate centres) with stock and your price #
POST /api/v1/wholesale/numbers Order a wholesale number #
PATCH /api/v1/wholesale/numbers/{id}/delivery Repoint where a number delivers #

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-wholesale-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-wholesale-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Callnode Io Wholesale API
  version: 1.0.0
  description: 'Operations tagged Wholesale 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: Wholesale
  description: 'Wholesale (SBC-as-a-Service) DID ordering — US and international numbers

    delivered straight to your SIP endpoint. Requires wholesale to be active

    on your account and completed business verification; every endpoint

    otherwise returns 403.


    **Outbound PSTN termination is SIP, not HTTP.** Where it is enabled on

    your account you send us an INVITE on your trunk and we complete the call;

    there is no HTTP endpoint to call, so it is not described below. The rules

    that matter — the caller ID you may present, what each refusal code means,

    and how minutes are charged — are in the SIP trunking guide under

    "Wholesale outbound termination". Whether it is enabled on your account,

    and at what rate, is shown on your SBC Tenant page in the dashboard.'
paths:
  /api/v1/wholesale/countries:
    get:
      tags:
      - Wholesale
      summary: List wholesale countries
      description: 'Countries where wholesale inventory exists — US and international.


        All `/api/v1/wholesale` endpoints are gated per request: wholesale must

        be ACTIVE on your account (arranged with our team — raise a Wholesale

        Activation request from the dashboard) and your business verification

        must be complete. Otherwise requests return

        `403 wholesale_not_activated` or `403 account_not_verified`.


        `countryId` values are opaque signed tokens with a short lifetime —

        fetch them per ordering session and never persist them.'
      operationId: listWholesaleCountries
      responses:
        '200':
          description: Countries with wholesale inventory.
          content:
            application/json:
              schema:
                type: object
                properties:
                  countries:
                    type: array
                    items:
                      type: object
                      properties:
                        countryId:
                          type: string
                          description: Opaque token. Pass back verbatim; do not persist.
                        countryName:
                          type: string
                          example: UNITED KINGDOM
                        isUS:
                          type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Wholesale not active on this account, or business verification incomplete.
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/wholesale/states:
    get:
      tags:
      - Wholesale
      summary: List states/regions for a country
      description: 'Regions for a country. Many countries have none — an empty list means

        go straight to areas with just the `countryId`.'
      operationId: listWholesaleStates
      parameters:
      - name: countryId
        in: query
        required: false
        description: From `/wholesale/countries`. Defaults to the US when omitted.
        schema:
          type: string
      responses:
        '200':
          description: Regions (possibly empty).
          content:
            application/json:
              schema:
                type: object
                properties:
                  states:
                    type: array
                    items:
                      type: object
                      properties:
                        stateId:
                          type: string
                          description: Opaque token.
                        stateName:
                          type: string
                          example: Florida
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Wholesale not active, or verification incomplete.
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/wholesale/areas:
    get:
      tags:
      - Wholesale
      summary: List areas (rate centres) with stock and your price
      description: 'Areas with available stock and `estMonthlyUsd` — YOUR contract price

        per number in that area, resolved server-side. There is no per-number

        search on wholesale inventory: you order from an area and a number is

        allocated.


        The first fetch for a large country (the UK has 600+ rate centres) can

        take up to a minute; results are cached server-side for ~10 minutes.

        Stock above zero does not guarantee an order succeeds — on an order

        failure, pick a different area rather than retrying the same one.'
      operationId: listWholesaleAreas
      parameters:
      - name: countryId
        in: query
        required: false
        schema:
          type: string
      - name: stateId
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Areas offering wholesale numbers.
          content:
            application/json:
              schema:
                type: object
                properties:
                  areas:
                    type: array
                    items:
                      type: object
                      properties:
                        areaId:
                          type: string
                          description: Opaque token. Order with it in the same session.
                        areaName:
                          type: string
                          example: MIAMI
                        areaCode:
                          type: string
                          example: '786'
                        stock:
                          type: integer
                          example: 387
                        orderable:
                          type: boolean
                        estMonthlyUsd:
                          type:
                          - number
                          - 'null'
                          description: Your monthly price per number in this area, at your contract rates.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Wholesale not active, or verification incomplete.
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/wholesale/numbers:
    post:
      tags:
      - Wholesale
      summary: Order a wholesale number
      description: 'Allocates a number from an area and starts delivering its inbound

        calls to your SIP endpoint. Prepaid: the first month at your contract

        rate is charged from your wallet at allocation, then monthly; inbound

        minutes are charged per call as they complete.


        `deliverTo` accepts three forms:

        - a bare host (`pbx.example.com` or a public IP) — we deliver as

        `sip:@host`

        - a sip: URI containing `{number}` — replaced with the allocated number

        - a full `sip:` URI, used verbatim


        Allocation can take up to ~40 seconds. On `order_failed` for a specific

        area, order from a DIFFERENT area — retrying the same one will not help.'
      operationId: orderWholesaleNumber
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - areaId
              - deliverTo
              properties:
                areaId:
                  type: string
                  description: From `/wholesale/areas`
                  same session.: null
                deliverTo:
                  type: string
                  description: Host, `{number}` template, or full sip URI (public hosts only).
                  example: pbx.example.com
                friendlyName:
                  type: string
                  maxLength: 100
                countryId:
                  type: string
                  description: Pass when ordering outside the US.
      responses:
        '201':
          description: Number allocated, delivering, and charged.
          content:
            application/json:
              schema:
                type: object
                properties:
                  number:
                    type: object
                    properties:
                      id:
                        type: string
                      phoneNumber:
                        $ref: '#/components/schemas/E164'
                      areaName:
                        type:
                        - string
                        - 'null'
                      areaCode:
                        type:
                        - string
                        - 'null'
                      deliverTo:
                        type: string
                        example: sip:+14155550142@pbx.example.com
                  charged:
                    type: number
                    description: First month
                    charged now.: null
                  monthlyRate:
                    type: number
                  wallet:
                    type: object
                    properties:
                      balance:
                        type: number
                  billing:
                    type: string
                    enum:
                    - wallet
        '400':
          description: Missing/invalid areaId or deliverTo (private hosts are refused).
        '402':
          description: Insufficient wallet balance — nothing was ordered.
        '403':
          description: Wholesale not active, verification incomplete, or rates not configured.
        '502':
          description: The area could not be provisioned — order from a different area.
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/wholesale/numbers/{id}/delivery:
    patch:
      tags:
      - Wholesale
      summary: Repoint where a number delivers
      description: 'Changes the delivery destination of an existing wholesale number —

        same `deliverTo` forms as ordering, resolved against the known number.

        Clearing delivery is not allowed: a wholesale number with no

        destination silently drops every call.'
      operationId: updateWholesaleDelivery
      parameters:
      - name: id
        in: path
        required: true
        description: The number's id (from the order response or your numbers list).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - deliverTo
              properties:
                deliverTo:
                  type: string
                  example: sbc2.example.com
      responses:
        '200':
          description: Delivery updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  phoneNumber:
                    $ref: '#/components/schemas/E164'
                  deliverTo:
                    type: string
        '400':
          description: Invalid destination.
        '404':
          description: Not a wholesale number on your account.
        '409':
          description: The number has been released.
    servers:
    - url: https://api.callnode.io
      description: Production
components:
  schemas:
    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
    E164:
      type: string
      pattern: ^\+[1-9]\d{6,14}$
      description: Plus sign followed by 7–15 digits.
      example: '+16135551234'
  parameters:
    IdempotencyKey:
      name: X-Idempotency-Key
      in: header
      required: false
      description: A UUID. Replaying the same key returns the original result rather than acting twice.
      schema:
        type: string
        format: uuid
  responses:
    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