SMS Verification API for Developers

The SMSBulk SMS verification API gives your code a real phone number on demand and hands back the verification code as soon as it arrives. One JSON API, one prepaid balance, automatic refunds when no SMS shows up.

Receive an OTP in three API calls

This is the whole loop: reserve a number, poll until the SMS code arrives, confirm it was used. The examples below run against the production API exactly as written, just export your key first.

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

async function api(path, options = {}) {
  const res = await fetch(BASE + path, {
    ...options,
    headers: { 'X-API-Key': KEY, 'Content-Type': 'application/json' },
  });
  if (!res.ok) throw new Error(res.status + ' ' + (await res.text()));
  return res.json();
}

async function main() {
  // 1) Buy a number for Telegram in the United States
  const activation = await api('/activations', {
    method: 'POST',
    body: JSON.stringify({ serviceCode: 'tg', countryIso: 'US' }),
  });
  console.log('Number:', activation.phoneNumber);

  // 2) Poll until the verification code arrives
  let code = null;
  while (!code) {
    await new Promise((r) => setTimeout(r, 5000));
    const a = await api('/activations/' + activation.id);
    if (a.status === 'RECEIVED') code = a.smsCode;
    else if (['CANCELLED', 'EXPIRED', 'REFUNDED'].includes(a.status)) {
      throw new Error('Ended without SMS: ' + a.status);
    }
  }
  console.log('Verification code:', code);

  // 3) Confirm the code was used
  await api('/activations/' + activation.id + '/complete', { method: 'POST' });
}

main();

Create a key under Dashboard, then explore every endpoint and response schema in the API documentation. If a code never arrives, the activation expires and your balance is refunded automatically.

From signup to production in four steps

Create an account

Sign up with an email address. No contracts, no monthly fees, pay as you go.

Generate an API key

Issue a key in the dashboard and send it as the X-API-Key header on every request.

Make your first request

POST /v1/activations with a service code and country ISO. You get a number back in seconds.

Scale to production

Documented rate limits, cursor pagination and predictable error codes keep automation stable.

What you get with the OTP API

A phone verification API is only useful if it behaves the same on request one million as it did on request one. These are the guarantees the platform is built around.

Plain REST and JSON

No SDK lock-in: any HTTP client in any language works. Auth is a single header.

Fast code delivery

Most verification codes land within seconds of the SMS being sent. Poll the activation and read smsCode the moment status flips to RECEIVED.

Automatic refunds

You pay only for verifications that work. If no SMS arrives before the activation expires, the charge returns to your balance without a support ticket.

Global coverage

Numbers across every region, with live per-country stock and pricing in the public catalogue endpoints. Browse the service catalogue to see what is live right now.

SMS-Activate compatible endpoint

Migrating an integration written for the SMS-Activate protocol? Point it at our SMS-Activate compatible API docs and keep your existing client code.

One balance, four products

The same wallet pays for SMS verification, email verification, number rentals and eSIM data. One top-up covers your whole stack.

Live starting prices for popular services

Prices are per successful verification and vary by country. These are live starting prices from the catalogue, refreshed hourly on this page:

TikTokfrom $0.02
ProtonMailfrom $0.01
Naverfrom $0.05
Applefrom $0.01
Snapchatfrom $0.01
KakaoTalkfrom $0.10
Baidufrom $0.03
Yandexfrom $0.01

Exact per-country prices come from GET /v1/services/{slug}/countries, the same data the dashboard shows.

One API for every verification flow

Whether you call it an OTP API, a phone verification API or a receive-SMS API, the job is identical: your system needs a temporary number that can catch a verification code and hand it back as machine-readable JSON. That is the entire contract of POST /v1/activations.

Teams use it to verify signup flows in CI, to onboard fleets of business accounts, to test region-locked registration forms and to keep personal numbers out of third-party databases. Bulk usage is a first-class citizen: create activations in parallel, list them with cursor pagination and reconcile costs per activation from the wallet transaction log.

If your use case is the number itself rather than a single code, the virtual number API page covers provisioning, lifecycle and release in depth.

Built for AI agents too

SMSBulk ships an official MCP server, so AI agents and LLM-powered workflows can buy numbers, wait for codes and manage the wallet with native tool calls instead of hand-rolled HTTP. If you are wiring an agent that needs SMS verification, start with the MCP server documentation.

SMS verification API FAQ

How do I receive SMS verification codes via API?

Create an activation with POST /v1/activations, then poll GET /v1/activations/{id}. When the status becomes RECEIVED, the smsCode field contains the verification code. The full loop is three calls, as in the examples above.

Can I try the API without a big commitment?

Yes. Accounts are pay-as-you-go with no subscription: top up a small amount, run your integration against production and every activation that receives no SMS is refunded to the balance automatically.

What countries does the SMS verification API support?

Coverage is global and changes with live stock. GET /v1/countries lists supported countries and GET /v1/services/{slug}/countries shows exactly where a given service has numbers right now, with prices.

Is the API compatible with SMS-Activate?

Yes. Alongside the native REST API there is a protocol-compatible endpoint, so tooling and libraries written for the SMS-Activate API keep working. See the SMS-Activate compatible API docs for the mapping.

What happens if no SMS arrives?

The activation expires and the charge is automatically refunded to your balance. You can also cancel an unused activation early with DELETE /v1/activations/{id}.

How fast do verification codes arrive?

Delivery depends on the destination service, but most codes arrive within seconds. The catalogue exposes an avgArrivalSeconds field per country so you can pick fast routes programmatically.

Keep exploring

Need the number as a resource rather than a one-off code? Read the virtual number API guide. Prefer a number that stays yours for days? See number rentals.

Ship your verification flow today