CallNode Phone Numbers API

Search inventory, purchase numbers, provision webhooks, and release numbers.

GitHub OpenAPI
Business capability
Numbering Resource Management BC-2640.30

Operations 6

GET /api/v1/numbers/available Search purchasable numbers #
POST /api/v1/numbers Purchase a number #
GET /api/v1/numbers List your numbers #
GET /api/v1/numbers/{id} Retrieve a number #
PATCH /api/v1/numbers/{id} Update a number's configuration #
DELETE /api/v1/numbers/{id} Release a 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/callnode-io:callnode-io-phone-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. 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-phone-numbers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Callnode Io Phone Numbers API
  version: 1.0.0
  description: 'Operations tagged Phone Numbers 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: Phone Numbers
  description: Search inventory, purchase numbers, provision webhooks, and release numbers.
paths:
  /api/v1/numbers/available:
    get:
      tags:
      - Phone Numbers
      summary: Search purchasable numbers
      description: 'Searches live carrier inventory for numbers you can purchase right now.

        Local searches require `areaCode`; toll-free searches accept an optional

        `prefix` (800–888) or a `vanity` word. The `pricing` block reflects what

        **your** account would pay today — Pro Bundle discounts and included-number

        slots are applied automatically.'
      operationId: searchAvailableNumbers
      parameters:
      - name: type
        in: query
        schema:
          type: string
          enum:
          - local
          - tollfree
          default: local
      - name: areaCode
        in: query
        description: 3-digit area code. Required when `type` is `local`.
        schema:
          type: string
          pattern: ^\d{3}$
          example: '828'
      - name: prefix
        in: query
        description: Toll-free prefix filter. 800 and 822 are usually exhausted.
        schema:
          type: string
          enum:
          - '800'
          - '822'
          - '833'
          - '844'
          - '855'
          - '866'
          - '877'
          - '888'
      - name: vanity
        in: query
        description: Toll-free vanity word, 4–7 letters or digits (e.g. NEWCAR). Takes precedence over `prefix`.
        schema:
          type: string
          minLength: 4
          maxLength: 7
      - name: quantity
        in: query
        description: How many candidates to return.
        schema:
          type: integer
          default: 10
          minimum: 1
          maximum: 25
      responses:
        '200':
          description: Matching inventory plus your current pricing. An empty `numbers` array means no inventory in that area — try another area code or prefix.
          content:
            application/json:
              schema:
                type: object
                properties:
                  numbers:
                    type: array
                    items:
                      $ref: '#/components/schemas/AvailableNumber'
                  count:
                    type: integer
                  pricing:
                    $ref: '#/components/schemas/NumberPricing'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          description: The carrier search is temporarily unavailable (`search_failed`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/numbers:
    post:
      tags:
      - Phone Numbers
      summary: Purchase a number
      description: 'Purchases a number found via search and bills your wallet for the first

        month at your plan''s rate (no setup fee; an included Pro Bundle number

        costs nothing). Voice and messaging webhooks can be

        provisioned in the same call, so the number is fully wired the moment it

        activates — no dashboard visit needed.


        `type` is optional and derived from the number itself (8NN prefixes are

        toll-free). Purchasing is idempotent on the number: re-purchasing a number

        you already own returns `200` with the existing record instead of billing

        twice. A number you previously released is automatically restored from the

        recycle bin rather than re-ordered.


        A2P messaging registration provisions asynchronously after purchase — the

        number''s `messaging.ready` flag flips to `true` when it can send SMS/MMS.'
      operationId: purchaseNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseNumberRequest'
            example:
              phoneNumber: '+18282129522'
              friendlyName: Support line
              voice:
                webhookUrl: https://yourcrm.example.com/voice/n8n
                webhookAuth:
                  type: header
                  headerName: X-API-Key
                  value: your-n8n-secret
              messaging:
                webhookUrl: https://yourcrm.example.com/sms/n8n
                webhookAuth:
                  type: bearer
                  value: your-token
                enabled: true
      responses:
        '201':
          description: Number purchased, billed, and configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseNumberResponse'
        '200':
          description: Idempotent replay — you already own this number; nothing was billed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseNumberResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: Insufficient wallet balance (`insufficient_balance`). The body includes `required`, `current`, and `needed` amounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The number is not available for purchase (`number_unavailable`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The carrier order failed (`provider_error`). Nothing was billed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      tags:
      - Phone Numbers
      summary: List your numbers
      operationId: listNumbers
      description: Your numbers, newest first. Every filter is applied server-side and they combine (AND).
      parameters:
      - name: status
        in: query
        description: Filter by status, e.g. `active`.
        schema:
          type: string
      - name: type
        in: query
        schema:
          type: string
          enum:
          - local
          - tollfree
      - name: purchaseSource
        in: query
        description: Numbers bought via the dashboard (`web`) or this API (`api`).
        schema:
          type: string
          enum:
          - web
          - api
      - name: tag
        in: query
        description: Numbers carrying this exact tag (as stored; up to 24 characters).
        schema:
          type: string
          maxLength: 24
      - name: q
        in: query
        description: Substring match on the number's digits, the friendly name (case-insensitive), or a tag.
        schema:
          type: string
          maxLength: 40
      responses:
        '200':
          description: Your numbers, newest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  numbers:
                    type: array
                    items:
                      $ref: '#/components/schemas/PhoneNumber'
                  count:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://api.callnode.io
      description: Production
  /api/v1/numbers/{id}:
    parameters:
    - name: id
      in: path
      required: true
      description: The number's `id`, or the E.164 number itself (URL-encode the `+`, e.g. `%2B18285551234`).
      schema:
        type: string
        example: cmpxeh9o60002pp4h7oznictb
    get:
      tags:
      - Phone Numbers
      summary: Retrieve a number
      operationId: getNumber
      responses:
        '200':
          description: The number and its webhook configuration.
          content:
            application/json:
              schema:
                type: object
                properties:
                  number:
                    $ref: '#/components/schemas/PhoneNumber'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
      - Phone Numbers
      summary: Update a number's configuration
      description: 'Provisions or updates the voice webhook (your AI agent endpoint), the

        messaging webhook, their authentication, and the friendly name. Only the

        fields you send change; webhook secrets are write-only and never echoed

        back (responses report `valueSet: true` instead).'
      operationId: updateNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                friendlyName:
                  type: string
                  maxLength: 100
                tags:
                  $ref: '#/components/schemas/NumberTags'
                voice:
                  $ref: '#/components/schemas/VoiceConfig'
                messaging:
                  $ref: '#/components/schemas/MessagingConfig'
            example:
              voice:
                webhookUrl: https://yourcrm.example.com/voice/n8n
                webhookAuth:
                  type: header
                  headerName: X-API-Key
                  value: your-n8n-secret
      responses:
        '200':
          description: The updated number.
          content:
            application/json:
              schema:
                type: object
                properties:
                  number:
                    $ref: '#/components/schemas/PhoneNumber'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
      - Phone Numbers
      summary: Release a number
      description: 'Releases the number and stops its billing. Released numbers are parked in

        a recycle bin tied to your account — re-purchasing the same number later

        restores it (with fresh billing) instead of losing it forever.'
      operationId: releaseNumber
      responses:
        '200':
          description: Released. `restorable` tells you whether it can be re-purchased later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  phoneNumber:
                    $ref: '#/components/schemas/E164'
                  released:
                    type: boolean
                  restorable:
                    type: boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    servers:
    - url: https://api.callnode.io
      description: Production
components:
  schemas:
    WebhookAuthStatus:
      type:
      - object
      - 'null'
      description: How CallNode authenticates to your webhook. The secret itself is write-only and never returned.
      properties:
        type:
          type: string
          enum:
          - basic
          - bearer
          - header
        headerName:
          type: string
        valueSet:
          type: boolean
    PurchaseNumberRequest:
      type: object
      required:
      - phoneNumber
      properties:
        phoneNumber:
          allOf:
          - $ref: '#/components/schemas/E164'
          description: A number returned by the availability search.
        type:
          type: string
          enum:
          - local
          - tollfree
          description: Optional — derived from the number itself when omitted.
        friendlyName:
          type: string
          maxLength: 100
        tags:
          $ref: '#/components/schemas/NumberTags'
        voice:
          $ref: '#/components/schemas/VoiceConfig'
        messaging:
          $ref: '#/components/schemas/MessagingConfig'
    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
    PurchaseNumberResponse:
      type: object
      properties:
        number:
          $ref: '#/components/schemas/PhoneNumber'
        charged:
          type: number
          description: Amount deducted from your wallet. 0 for included-in-plan numbers and idempotent replays.
        breakdown:
          type:
          - object
          - 'null'
          properties:
            setupFee:
              type: number
            monthlyFee:
              type: number
            total:
              type: number
        wallet:
          type:
          - object
          - 'null'
          properties:
            previousBalance:
              type: number
            newBalance:
              type: number
        includedInSubscription:
          type: boolean
        idempotencyReplay:
          type: boolean
          description: True when you already owned this number and nothing was billed.
    E164:
      type: string
      pattern: ^\+[1-9]\d{6,14}$
      description: Plus sign followed by 7–15 digits.
      example: '+16135551234'
    VoiceConfig:
      type: object
      description: 'Voice configuration — how inbound calls to this number are answered. Three modes: a conversational WEBHOOK agent (webhookUrl set), SIP DELIVERY to a literal endpoint (sipUri set), or SIP DELIVERY to one of your saved trunks (trunkId set). sipUri and trunkId are mutually exclusive — setting one clears the other, and either takes precedence over the webhook. Wholesale numbers must always keep at least one mode — a change that would leave none is rejected with 400.'
      properties:
        webhookUrl:
          type:
          - string
          - 'null'
          format: uri
          description: Invoked when a call connects and once per caller utterance. Empty/null disconnects the webhook.
        sipUri:
          type:
          - string
          - 'null'
          description: 'BYOC / wholesale SIP delivery: when set, inbound calls bridge straight to this sip: endpoint and the webhook never runs. Format sip:user@host[:port][;transport=udp|tcp|tls], public hosts only. Null switches the number back to webhook mode (for wholesale numbers, only allowed when a webhookUrl is present).'
        srtp:
          type: boolean
          default: false
          description: Encrypt the audio on the sipUri delivery leg (SRTP with SDES key exchange, AES_CM_128_HMAC_SHA1_80 / AES_CM_128_HMAC_SHA1_32; no fallback to plain RTP). Accepted only when sipUri ends in ;transport=tls — otherwise 400. Cleared automatically when the address changes to UDP/TCP or the number switches to trunk delivery. See /docs/sip-trunking#byoc-srtp.
        trunkId:
          type:
          - string
          - 'null'
          description: Deliver inbound calls to one of your SIP trunks. A trunk with an egress host is dialed at that host; a REGISTRATION trunk is resolved to wherever your PBX is currently registered, at call time — the way to receive DID calls on equipment behind NAT. If the trunk is not registered when a call arrives, the call falls back to the number's webhook agent (if configured). Null clears trunk delivery. Mutually exclusive with sipUri.
        realtime:
          type:
          - object
          - 'null'
          description: 'Realtime WebSocket mode (see /docs/realtime): CallNode opens a WebSocket to `url` for every call to this number and streams transcripts (and, on request, caller audio); you stream audio back, transfer or hang up. The webhook stays the fallback when the socket cannot be reached. Null turns it off. The auth secret is write-only (reads return valueSet).'
          properties:
            url:
              type: string
              format: uri
              description: wss:// URL on a public host
            auth:
              $ref: '#/components/schemas/WebhookAuth'
            voice:
              type:
              - string
              - 'null'
              description: 'Voice for `say` frames (text mode): an id from GET /api/v1/numbers/voices. Null = the platform default voice.'
          required:
          - url
        webhookAuth:
          $ref: '#/components/schemas/WebhookAuth'
        webhookTimeout:
          type: integer
          minimum: 1000
          maximum: 120000
          default: 30000
          description: Webhook response timeout in milliseconds.
    NumberTags:
      type: array
      maxItems: 10
      items:
        type: string
        minLength: 1
        maxLength: 24
        pattern: ^[A-Za-z0-9][A-Za-z0-9 ._-]*$
      description: Your own labels for the number. Trimmed, de-duplicated case-insensitively, returned on every number, filterable on the dashboard. PATCH replaces the whole list; send [] to clear.
      example:
      - support
      - east-coast
    PhoneNumber:
      type: object
      properties:
        id:
          type: string
          example: cmpxeh9o60002pp4h7oznictb
        phoneNumber:
          $ref: '#/components/schemas/E164'
        type:
          type: string
          enum:
          - local
          - tollfree
        friendlyName:
          type:
          - string
          - 'null'
        status:
          type: string
          example: active
        purchaseSource:
          type: string
          enum:
          - web
          - api
          description: How the number was purchased — via the dashboard (`web`) or this API (`api`).
        tags:
          $ref: '#/components/schemas/NumberTags'
        voice:
          type: object
          properties:
            webhookUrl:
              type:
              - string
              - 'null'
              format: uri
            webhookAuth:
              $ref: '#/components/schemas/WebhookAuthStatus'
            webhookTimeout:
              type: integer
            sipUri:
              type:
              - string
              - 'null'
              description: SIP delivery target (BYOC / wholesale). Null when the number runs in webhook mode.
            srtp:
              type: boolean
              description: Whether the sipUri delivery leg offers SRTP (only ever true beside a ;transport=tls address).
            trunkId:
              type:
              - string
              - 'null'
              description: SIP trunk this number delivers inbound calls to. Null unless trunk delivery is configured.
            realtime:
              type:
              - object
              - 'null'
              description: Realtime WebSocket mode (see /docs/realtime). Null when the number runs the per-turn webhook loop.
              properties:
                url:
                  type: string
                  format: uri
                  description: wss:// endpoint CallNode connects to per call
                auth:
                  $ref: '#/components/schemas/WebhookAuthStatus'
                voice:
                  type:
                  - string
                  - 'null'
                  description: Voice id used for say frames; null = platform default
        messaging:
          type: object
          properties:
            webhookUrl:
              type:
              - string
              - 'null'
              format: uri
            webhookAuth:
              $ref: '#/components/schemas/WebhookAuthStatus'
            enabled:
              type: boolean
            ready:
              type:
              - boolean
              - 'null'
              description: Whether A2P messaging registration has completed for this number. Provisions asynchronously after purchase.
        monthlyRate:
          type: number
          example: 1.99
        perMinuteRate:
          type: number
          example: 0.02
        includedInSubscription:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    NumberPricing:
      type: object
      description: What your account pays for this number type, plan-aware.
      properties:
        setupFee:
          type: number
          example: 0
        monthlyFee:
          type: number
          example: 1.99
        perMinuteRate:
          type: number
          example: 0.02
        totalDueNow:
          type: number
          description: First month at your plan's rate (setupFee is always 0). 0 when the number is included in your subscription.
        includedInSubscription:
          type: boolean
    WebhookAuth:
      type: object
      description: How CallNode authenticates to your webhook endpoint.
      properties:
        type:
          type: string
          enum:
          - none
          - basic
          - bearer
          - header
        headerName:
          type: string
          description: Header name when `type` is `header`.
        value:
          type: string
          description: The secret, token, or `user:pass` pair, depending on `type`.
      required:
      - type
    MessagingConfig:
      type: object
      description: Messaging webhook configuration for inbound SMS/MMS to this number.
      properties:
        webhookUrl:
          type:
          - string
          - 'null'
          format: uri
        webhookAuth:
          $ref: '#/components/schemas/WebhookAuth'
        enabled:
          type: boolean
          default: true
    AvailableNumber:
      type: object
      properties:
        phoneNumber:
          $ref: '#/components/schemas/E164'
        type:
          type: string
          enum:
          - local
          - tollfree
        city:
          type:
          - string
          - 'null'
          example: HICKORY
        region:
          type:
          - string
          - 'null'
          description: State/province.
          example: NC
        rateCenter:
          type:
          - string
          - 'null'
          example: HICKORY
  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