1. Overview
SMSPalm provides verification-number APIs for virtual number providers. Typical flow:
getNumber -> getStatus polling -> setStatus to complete/cancel.
Provider selection: use server=serverone (default, PalmServerOne), server=servertwo (PalmServerTwo), or server=serverthree (PalmServerThree).
| Param | Type | Required | Description |
server |
string |
No |
Routes the request to a provider.
Default: serverone (PalmServerOne).
Use servertwo for PalmServerTwo and serverthree for PalmServerThree.
|
- Fetch services and prices for a country.
- Reserve a number for a service.
- Poll for SMS code.
- Finalize or cancel activation.
2. Authentication
Every request includes your API key in an HTTP header. API keys in URLs are rejected because URLs are commonly retained in access logs and browser history.
Get your API key from your SMSPalm account dashboard:
Settings -> API Key
(open settings).
curl -H "X-API-Key: YOUR_API_KEY" "https://smspalm.com/api/v1/handler?action=getBalance"
Rate limit: 100 requests/min per token. Contact support if you need higher limits.
3. Get Balance
action=getBalance
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=getBalance"
Response
ACCESS_BALANCE:124.94
4. Get Countries
action=getCountries
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=getCountries"
Default provider is PalmServerOne. To use PalmServerTwo, add server=servertwo. To use PalmServerThree, add server=serverthree.
Response (JSON array)
[
{"id": 187, "eng": "United States"},
{"id": 50, "eng": "Bangladesh"}
]
5. Get Services List
action=getServicesList
| Param | Type | Required | Description |
server | string | No | Provider route (default serverone / PalmServerOne). |
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=getServicesList"
Response (JSON)
{
"status": "success",
"services": [
{"code": "wa", "name": "WhatsApp"},
{"code": "tg", "name": "Telegram"}
]
}
Service identifier returned by the API is code (also used as short_name in SMSPalm integration logic). Use this value in getNumber&service=....
6. Get Prices
action=getPrices
| Param | Type | Required | Description |
service | string | Yes | Service short code (e.g. wa). |
country | string | No | Country code or ID depending on provider. |
server | string | No | Provider route (default serverone / PalmServerOne). |
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=getPrices" \
--data-urlencode "service=wa" \
--data-urlencode "country=US"
Response shape (JSON)
{
"187": {
"wa": {"cost": 250.00, "count": 345}
}
}
Prices returned by the API are in Naira (NGN), same as frontend display.
7. Get Number
action=getNumber reserves a phone number for verification.
| Param | Type | Required | Description |
service | string | Yes | Service short code. |
country | string | Yes | Default (PalmServerOne): numeric country ID (e.g. 187) or provider country code. For PalmServerTwo (server=servertwo), use an ISO code like US. |
server | string | No | Provider route. Default: serverone (PalmServerOne). Use servertwo for PalmServerTwo. Use serverthree for PalmServerThree. |
ref | string | No | Your reference ID. |
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=getNumber" \
--data-urlencode "service=wa" \
--data-urlencode "country=US"
Wallet balance is checked before the system reserves/buys a number. If you don’t have enough balance, you’ll get NO_BALANCE.
To use PalmServerTwo instead of the default PalmServerOne route:
add server=servertwo and pass an ISO country code like US.
To use PalmServerThree:
add server=serverthree and (optionally) pass a numeric country ID like 187.
Success Response
ACCESS_NUMBER:50292409:14804343809
Format: ACCESS_NUMBER:{activation_id}:{phone_number}
8. Get Status
action=getStatus&id={activation_id}
SMSPalm always routes status and cancellation requests by the order's stored provider; a caller-supplied server value cannot override it.
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=getStatus" \
--data-urlencode "id=50292409"
Possible Responses
| Response | Meaning |
STATUS_WAIT_CODE | Waiting for first SMS. |
STATUS_WAIT_RETRY:1234 | Waiting for next SMS, last code provided. |
STATUS_OK:739214 | Code received. |
STATUS_CANCEL | Activation canceled. |
NO_ACTIVATION | Invalid/expired activation ID. |
9. Set Status
action=setStatus&id={activation_id}&status={code}
If server is not provided, SMSPalm will automatically route the request based on the stored order provider.
For PalmServerTwo, only status=8 (cancel) is supported via this endpoint.
Status Codes
| Code | Meaning |
1 | Mark number as ready for SMS. |
3 | Request another code (retry). |
6 | Complete activation. |
8 | Cancel activation. |
Example
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=setStatus" \
--data-urlencode "id=50292409" \
--data-urlencode "status=8"
Possible Responses
ACCESS_READY
ACCESS_RETRY_GET
ACCESS_ACTIVATION
ACCESS_CANCEL
10. Cancel Order Endpoint
Cancel an active order by calling setStatus with status 8.
curl -G "https://smspalm.com/api/v1/handler" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "action=setStatus" \
--data-urlencode "id=50292409" \
--data-urlencode "status=8"
Response
ACCESS_CANCEL
11. Error Responses
Common provider error strings:
| Response | Meaning |
BAD_KEY | Invalid API key. |
BAD_ACTION | Unknown action name. |
BAD_SERVICE | Unknown service code. |
BAD_STATUS | Invalid setStatus code. |
NO_NUMBERS | No available numbers for current criteria. |
NO_ACTIVATION | Invalid activation ID. |
NO_BALANCE | Insufficient wallet balance (checked before number is reserved/bought). |
EARLY_CANCEL_DENIED | Cancellation too early after purchase. |
Use string-response parsing in your client because some actions do not return JSON.
12. Support & Contact
Postman Collection: Download JSON
Developer Email: support@smspalm.com