Virtual Number API: Phone Numbers on Demand

The SMSBulk virtual number API turns phone numbers into an on-demand resource: query live availability and pricing, provision a temporary number with a single POST and release it when you are done. No telecom contracts, no SIM hardware, no monthly fees.

Discover, provision, release

The catalogue endpoints are public, so your code can compare markets before spending a cent. Provisioning itself is one authenticated POST. This walkthrough runs against production as written:

const BASE = 'https://smsbulk.net/api/v1';
const KEY = process.env.SMSBULK_API_KEY; // smsbulk_...

async function main() {
  // 1) Browse the live catalogue (public, no key needed)
  const { data: services } = await (await fetch(BASE + '/services')).json();
  console.log('First service:', services[0].name, services[0].minPrice);

  // 2) Where does Telegram have numbers right now, at what price?
  const tg = await (
    await fetch(BASE + '/services/telegram-verification/countries')
  ).json();
  const target = tg.countries[0]; // ranked by speed tier and score
  console.log('Best market:', target.name, target.price);

  // 3) Provision a number there (charged to your balance)
  const res = await fetch(BASE + '/activations', {
    method: 'POST',
    headers: { 'X-API-Key': KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ serviceCode: 'tg', countryIso: target.isoCode }),
  });
  if (!res.ok) throw new Error('HTTP ' + res.status);
  const number = await res.json();
  console.log('Provisioned:', number.phoneNumber, 'until', number.expiresAt);

  // 4) Release it unused later and the charge is refunded automatically
  await fetch(BASE + '/activations/' + number.id, {
    method: 'DELETE',
    headers: { 'X-API-Key': KEY },
  });
}

main();

Every endpoint, parameter and response schema is specified in the API documentation. Numbers are billed per activation from your prepaid balance, and releasing an unused number refunds it automatically.

Integration in four steps

Create an account

Sign up with an email address and top up a small starting balance. Pay per number, nothing recurring.

Generate an API key

Keys are created in the dashboard and sent as the X-API-Key header. Rotate or revoke them anytime.

Query the catalogue

GET /v1/services and GET /v1/services/{slug}/countries are public: live stock, prices and speed tiers per market.

Provision numbers

POST /v1/activations returns a dedicated number in seconds. Manage it with complete, cancel and resend endpoints.

Why teams provision numbers through SMSBulk

A number provisioning API has one job: when your workflow asks for a phone number, a working one appears, and when the workflow ends you are not stuck paying for it.

Instant provisioning

No porting, no carrier onboarding, no waiting for SIM cards. A POST returns a live, dedicated number in seconds.

Transparent market data

Public catalogue endpoints expose per-country price, stock and average SMS arrival speed, so your code can route to the best market automatically.

Full lifecycle over REST

Provision, poll, request another SMS, complete or cancel: every state change is an endpoint, so numbers plug into any orchestration.

Pay per number, refund on silence

Each activation is billed individually from a prepaid balance. If the number never receives a message, the charge is refunded automatically.

Global pool

Numbers across every region with live availability. Pick a market explicitly by ISO code or let your code choose from the catalogue ranking.

Longer-term numbers when you need them

One-off activations live for minutes. When a workflow needs the same number for days or weeks, number rentals covers it from the same balance (rentals are managed in the dashboard today).

Live provisioning prices

Numbers are priced per service and country. These are live starting prices from the catalogue, refreshed hourly on this page:

ProtonMailfrom $0.01
Applefrom $0.01
Snapchatfrom $0.01
Yandexfrom $0.01
Yallafrom $0.01
Microsoftfrom $0.01
Grindrfrom $0.01
TikTokfrom $0.02

Your code can read the same data: GET /v1/services returns catalogue-wide starting prices, GET /v1/services/{slug}/countries the exact per-market price.

Temporary, disposable or dedicated: the same API

Search for a temporary number API, a disposable number API or a phone number API for developers and you will find the same underlying need: numbers that appear when code asks and disappear without a contract. An activation gives you a private, dedicated number for its lifetime; it is never shared while you hold it, which is what separates this from public receive-SMS lists.

Typical integrations: QA suites that verify signup flows across markets, onboarding pipelines that provision a number per business account, privacy layers that keep real numbers out of third-party forms, and research tools that need region-specific presence.

If what you actually need is the verification code rather than the number itself, the SMS verification API page walks through the OTP loop end to end.

Numbers for AI agents

Agents can provision and manage numbers without custom HTTP glue: the official SMSBulk MCP server exposes the catalogue, activations and wallet as native tools. Wire it into your agent runtime with the MCP server documentation.

Virtual number API FAQ

How do I get a virtual phone number via API?

POST /v1/activations with a service code and a country ISO code. The response contains a dedicated phone number plus an id you use to poll, complete or cancel. See the code examples above for the full flow.

Can I choose which country the number is from?

Yes, the countryIso parameter selects the market. GET /v1/services/{slug}/countries shows every country where a service currently has stock, with the exact price for each.

Are the numbers private or shared?

Every activation reserves a dedicated number for you. Codes sent to it are visible only through your account, unlike public receive-SMS pages where anyone can read incoming messages.

What happens to unused numbers?

If a number receives no SMS, cancelling it (or letting it expire) refunds the charge to your balance automatically. You are never billed for silence.

Can I keep a number for days or weeks?

Yes, that is a rental rather than a one-off activation. Rentals run from the same balance and are managed in the dashboard; see number rentals for live durations and prices.

Is there an SDK, or do I integrate over raw HTTP?

The API is plain REST and JSON, so any HTTP client works with no SDK required. Tooling written for the SMS-Activate protocol also works through the SMS-Activate compatible API docs, and AI agents can use the official MCP server.

Keep exploring

Building a verification flow on top of these numbers? The SMS verification API guide covers the OTP loop. Need the same number for longer? See number rentals.

Provision your first number in minutes