API Reference

Build with SMSBulk

Modern REST API and SMS-Activate compatible endpoints.

Two API styles

Choose the format that fits your project: both backed by the same infrastructure.

Modern REST API

Clean JSON API with OpenAPI specification.

  • JSON request and response bodies
  • Versioned endpoints under /api/v1
  • Bearer token or x-api-key authentication
  • Standard HTTP status codes
curl https://smsbulk.net/api/v1/wallet/balance \
  -H "x-api-key: YOUR_KEY"

Legacy API Compatible

Compatible with the industry-standard query-based protocol: same actions, plain-text responses. Pointing an existing bot at our base URL is not enough on its own: check the country codes it sends.

  • Identical action-based protocol
  • Plain text response format
  • Same action names as common bot libraries
  • Country by ISO code (CL) or by our numeric ID from getCountries

Rent a phone number for a fixed period and read every SMS it receives, through the legacy-compatible handler_api.php endpoint. Rental API

curl "https://smsbulk.net/stubs/handler_api.php\
?api_key=YOUR_KEY&action=getBalance"

You can pass an ISO code in the country parameter (e.g. country=CL). Our numeric country table differs from the common list, so read the numeric ID from getCountries. getCountries also returns the country name (eng). Add &withCountry=1 to getPrices to get countryIso and countryName in each entry. Prices for countries without a numeric code are in the v1 catalog.

curl "https://smsbulk.net/stubs/handler_api.php\
?api_key=YOUR_KEY&action=getNumber&service=wa&country=CL"
Numeric country ID table (same as getCountries)
IDISOCountry
0RURussia
1UAUkraine
2KZKazakhstan
3CNChina
4PHPhilippines
5MMMyanmar (Burma)
6IDIndonesia
7MYMalaysia
8KEKenya
9TZTanzania
10VNVietnam
11KGKyrgyzstan
12USUnited States
13ILIsrael
14HKHong Kong SAR China
15PLPoland
16GBUnited Kingdom
17MGMadagascar
19NGNigeria
20MOMacao SAR China
21EGEgypt
22INIndia
23IEIreland
24KHCambodia
25LALaos
26HTHaiti
27CICôte d’Ivoire
28GMGambia
29RSSerbia
30YEYemen
31ZASouth Africa
32RORomania
33COColombia
34EEEstonia
35CACanada
36MAMorocco
37GHGhana
38ARArgentina
39UZUzbekistan
40CMCameroon
41TDChad
42DEGermany
43LTLithuania
44HRCroatia
45SESweden
46IQIraq
47NLNetherlands
48LVLatvia
49ATAustria
50BYBelarus
51THThailand
52SASaudi Arabia
53MXMexico
54TWTaiwan
55ESSpain
57DZAlgeria
58SISlovenia
59BDBangladesh
60SNSenegal
62CZCzechia
63LKSri Lanka
64PEPeru
65PKPakistan
66NZNew Zealand
67GNGuinea
68MLMali
69VEVenezuela
70ETEthiopia
71MNMongolia
72BRBrazil
73AFAfghanistan
74UGUganda
75AOAngola
76CYCyprus
77FRFrance
78PGPapua New Guinea
79MZMozambique
80NINicaragua
81NENiger
82BFBurkina Faso
83JMJamaica
84PAPanama
85GTGuatemala
86PRPuerto Rico
87DODominican Republic
88BOBolivia
89KRSouth Korea
90SKSlovakia
91BJBenin
92BGBulgaria
93TJTajikistan
94LBLebanon
96JOJordan
97PTPortugal
98PYParaguay
99SVEl Salvador
100HNHonduras
101ECEcuador
102ALAlbania
103LRLiberia
104CDCongo - Kinshasa
105MRMauritania
106UYUruguay
107CWCuraçao
108TGTogo
109SLSierra Leone
110ZWZimbabwe
111AZAzerbaijan
112TNTunisia
113PSPalestinian Territories
114TMTurkmenistan
115GEGeorgia
116GRGreece
117MZMozambique
118CRCosta Rica
119NANamibia
120GAGabon
121BIBurundi
122BWBotswana
123BNBrunei
124NPNepal
125GWGuinea-Bissau
126LSLesotho
127MWMalawi
128BEBelgium
129AMArmenia
130ZMZambia
131MCMonaco
132GYGuyana
133SRSuriname
134TLTimor-Leste
135GQEquatorial Guinea
136BSBahamas
137AWAruba
138TTTrinidad & Tobago
139AEUnited Arab Emirates
140RWRwanda
142BBBarbados
143AIAnguilla
144GDGrenada
145OMOman
146KWKuwait
147BHBahrain
148BTBhutan
149NCNew Caledonia
151CVCape Verde
152SCSeychelles
153KMComoros
154MVMaldives
155GGGuernsey
156JEJersey
157LULuxembourg
158ISIceland
159CGCongo - Brazzaville
160BZBelize
161DMDominica
162KNSt. Kitts & Nevis
163LCSt. Lucia
164VCSt. Vincent & Grenadines
165AGAntigua & Barbuda
166TCTurks & Caicos Islands
167KYCayman Islands
168VGBritish Virgin Islands
169BMBermuda
170GIGibraltar
171ADAndorra
172CHSwitzerland
173NONorway
174DKDenmark
175FIFinland
176BABosnia & Herzegovina
177AUAustralia
178ITItaly
179HUHungary
180ASAmerican Samoa
181TVTuvalu
182PWPalau
183NUNiue
184CKCook Islands
185TKTokelau
186FJFiji
187TRTürkiye
192EHWestern Sahara
193SBSolomon Islands
196SGSingapore
197TOTonga
198WSSamoa
199MTMalta
200LILiechtenstein
202FOFaroe Islands
203XKKosovo

Quick Start

From zero to your first SMS.

1

Get your API key

Create an API key from your dashboard. Each user can create up to 10 keys.

Open dashboard
2

Test authentication

Verify your key works by checking your wallet balance.

curl https://smsbulk.net/api/v1/wallet/balance \
  -H "x-api-key: YOUR_KEY"

# Response:
# { "balance": "10.00", "currency": "USD" }
3

Buy a number

Reserve a virtual number for SMS verification. Cost is deducted from your wallet.

curl -X POST https://smsbulk.net/api/v1/activations \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serviceCode": "wa",
    "countryIso": "US"
  }'

# Response:
# {
#   "id": "cuid_xxx",
#   "phoneNumber": "12025550147",
#   "status": "WAITING",
#   "userCost": "0.50"
# }
4

Wait for the SMS

Poll the activation endpoint until status becomes RECEIVED. The SMS code will be in the response.

Message contents, including the code, are deleted 30 days after they are received; getStatus then returns NO_ACTIVATION and v1 returns purged: true.

curl https://smsbulk.net/api/v1/activations/cuid_xxx \
  -H "x-api-key: YOUR_KEY"

# Response (when SMS arrives):
# {
#   "id": "cuid_xxx",
#   "smsCode": "123456",
#   "status": "RECEIVED",
#   ...
# }

List your activations

Returns your activations, newest first. Use it to check state or to recover after a timeout.

  • limit: 1-100, default 25
  • cursor: pass nextCursor from the previous response
  • status: comma-separated, e.g. PENDING,WAITING

Each item includes id, status, phoneNumber, service.code, country.isoCode, userCost, createdAt, cancellable and refund details.

curl "https://smsbulk.net/api/v1/activations?status=PENDING,WAITING&limit=50" \
  -H "x-api-key: YOUR_KEY"

# Response:
# { "items": [ ... ], "nextCursor": "cuid_xxx" }

Authentication

Three ways to send your API key.

Pick the method that fits your environment

1. Header (recommended)

x-api-key: YOUR_API_KEY

Standard header-based authentication. Works for both REST and SMS-Activate endpoints.

2. Bearer token

Authorization: Bearer YOUR_API_KEY

Compatible with HTTP client libraries that default to the Authorization header.

3. Query string

?api_key=YOUR_API_KEY

Required for the SMS-Activate compatibility endpoint /stubs/handler_api.php.

Keep your keys secret

Never commit API keys to public repositories or expose them in client-side code. Each key has a daily quota. Rotate immediately if compromised.

Ready to ship?

Get your API key and send your first request with the examples on this page.