Developer API

API documentation

Rent numbers, receive codes and manage rentals from your own app. The API is compatible with the sms-activate format.

Overview

Authentication

Send your API key as api_key in the URL of every request. Find it on your Profile page.

Rental limit

A limited number of rentals can wait for SMS at once (shown on your dashboard). Rent a number just before you need it. Contact support for a higher limit.

Fair billing

You only pay when a code arrives. Cancelled or expired rentals are refunded to your balance.

Base URL

GET or POST
https://hollysms.com/stubs/handler_api.php

All responses are plain text, for example ACCESS_BALANCE:50.30. Replace YOUR_API_KEY in the examples with your own key.

Rate limits

ActionScopeLimitDescription
getBalanceaction10 / secPer API key.
getNumberaction10 / secPer API key.
getStatus, setStatus, getExtraActivationaction1 / 3 secPer API key and rental ID.
getPrices, getPricesVerificationaction5 / 10 secPer API key.

When a limit is exceeded the API responds with RATE_LIMIT_EXCEEDED.

01

Check balance

Returns your current account balance in US dollars. Useful to check that you have enough funds before renting a number.

GET /stubs/handler_api.php?action=getBalance

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour API key from the Profile page.
actionstringRequiredMust be getBalance.

Example request

curl "https://hollysms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getBalance"

Responses

ResponseMeaning
ACCESS_BALANCE:50.30Success. Your balance is $50.30.
BAD_KEYThe API key is missing, wrong or the account is not active.
02

Get a number

Rents a real USA non-VoIP number for the chosen service. The response gives you the rental ID and the phone number. Use the service shortcode from the Services page (the API name column).

GET /stubs/handler_api.php?action=getNumber

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour API key from the Profile page.
actionstringRequiredMust be getNumber.
servicestringRequiredService shortcode, for example wa for WhatsApp.
max_pricenumberOptionalHighest price you accept, in dollars (e.g. 0.50). If the current price is higher, the request fails with MAX_PRICE_EXCEEDED. The limit is inclusive. Recommended on every request — see dynamic pricing.

Example request

curl "https://hollysms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getNumber&service=wa&max_price=1.00"

Responses

ResponseMeaning
ACCESS_NUMBER:10423:14155550142Success. Rental ID is 10423, number is +1 415 555 0142.
MAX_PRICE_EXCEEDEDThe current price is higher than your max_price.
NO_NUMBER_AVAILABLENo numbers are available for this service right now. Try again shortly.
TOO_MANY_ACTIVE_RENTALSYou have reached your active rental limit. Finish or cancel one first.
NO_MONEYNot enough balance. Add funds.
BAD_KEYThe API key is missing or wrong.
03

Receive the code

Checks whether the SMS has arrived for a rental. Poll this endpoint every 3 seconds or more until you get the code, or use a webhook instead. Services marked ∞ can receive several codes — the latest one is returned.

GET /stubs/handler_api.php?action=getStatus

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour API key from the Profile page.
actionstringRequiredMust be getStatus.
idnumberRequiredRental ID from the getNumber response.

Example request

curl "https://hollysms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getStatus&id=10423"

Responses

ResponseMeaning
STATUS_OK:482193The code has arrived: 482193.
STATUS_WAIT_CODEStill waiting for the SMS. Check again in a few seconds.
NO_ACTIVATIONNo rental found with this ID (or it has already finished).
04

Finish or cancel a rental

Ends a rental. If no code was received, the full price is returned to your balance. If a code was received, the rental is marked as done and frees a slot. Please don’t rent and cancel numbers in a loop without using them — it can get your account restricted.

GET /stubs/handler_api.php?action=setStatus

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour API key from the Profile page.
actionstringRequiredMust be setStatus.
idnumberRequiredRental ID from the getNumber response.
statusnumberRequired6 = done, 8 = cancel. Both refund the price if no code was received.

Example request

curl "https://hollysms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=setStatus&id=10423&status=8"

Responses

ResponseMeaning
ACCESS_CANCELThe rental is finished. Refunded if no code was received.
ACCESS_READYThe rental can’t be cancelled at this moment. Try again shortly.
NO_ACTIVATIONNo active rental found with this ID.
BAD_STATUSThe status must be 6 or 8.
05

Additional SMS on a used number

Rents a number you used before again, to receive one more message — as long as we still have the number in our system. You can check availability on the Rental history page. If you request a renewal but don’t receive any message, a small penalty may be charged.

GET /stubs/handler_api.php?action=getExtraActivation

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour API key from the Profile page.
actionstringRequiredMust be getExtraActivation.
activationIdnumberRequiredID of the previous rental of this number.

Example request

curl "https://hollysms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getExtraActivation&activationId=10423"

Responses

ResponseMeaning
ACCESS_NUMBER:10501:14155550142Ready to use. New rental ID and number.
ASLEEP:10501:14155550142:1753853008Number is being activated; it will be ready before the UNIX timestamp shown. Check status every 15 seconds.
BAD_IDThe number is no longer available, or the ID is wrong.
NO_MONEYNot enough balance.
06

Services and prices

Returns every service with its current price, an availability indicator and whether it accepts multiple SMS (multi). getPricesVerification returns the same data.

GET /stubs/handler_api.php?action=getPrices

Parameters

ParameterTypeStatusDescription
api_keystringRequiredYour API key from the Profile page.
actionstringRequiredgetPrices or getPricesVerification.

Example request

curl "https://hollysms.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=getPrices"

Responses

ResponseMeaning
{"wa":{"cost":0.9,"count":512,"multi":0},…}JSON object keyed by service shortcode.
BAD_KEYThe API key is missing or wrong.
07

Webhook payload

Instead of polling, set a webhook URL on your Profile page. Every incoming SMS is then sent to your server as a POST request with a JSON body.

MethodPOST · JSON
URLhttps:// only
Reply withAny 2xx status

Payload

{
  "activationId": 10423,
  "messageId": 1,
  "service": "WhatsApp",
  "text": "Your WhatsApp code: 482-193",
  "code": "482193",
  "country": "USA:1",
  "receivedAt": "2026-10-31 12:30:57"
}

Fields

ParameterTypeStatusDescription
activationIdnumberAlwaysRental ID, same as returned by getNumber.
messageIdnumberAlwaysSequence number of this SMS within the rental (1, 2, 3…).
servicestringAlwaysService name of the rental.
textstringAlwaysFull text of the SMS.
codestringAlwaysThe verification code found in the SMS.
countrystringAlwaysCountry data of the number.
receivedAtstringAlwaysTime the SMS arrived (YYYY-MM-DD HH:MM:SS, server time).

Need help with the API?

Our support team can help you with your integration 24/7.