How to use the SMSPool API

  • By Admin

What is an API?

An API (application programming interface) can easily communicate with our servers. You can connect it to your desired program and create your functionality within our APIs using the API. 

How do I use the SMSPool API?

Our endpoint is usually: https://api.smspool.net/ and is free of charge to use. It does not cost any money. SMSPool will provide you with a 32-character long API key attached to all your purchases, orders, and rentals upon registering. Please do NOT share this with anyone, as it could give users access to all your orders and balance.

All API requests can be done in both GET or POST, unless said otherwise and all responses are in JSON

What are the API endpoints?

All API endpoints are listed below, and it's listed logically from step one to get your SMS verifications.

Overview

  1. Country
  2. Balance
  3. Active orders
  4. Pricing
  5. All prices
  6. Suggested countries
  1. Order SMS
  2. Check SMS
  3. Resend SMS
  4. Cancel SMS
  5. Archive SMS
  1. Retrieve all rentals
  2. Order rental
  3. Rental messages
  4. Retrieve rental status
  5. Refund rental
  6. Extend rental

List of all informative endpoints

Country endpoint - https://api.smspool.net/country/retrieve_all

Param RequiredComment
country NoUse either the country number or country code required to retrieve services by country.

 

Responses

Success[{"ID":"1","name":"United States","region":"Americas"}]

 

 

Service endpoint - https://api.smspool.net/service/retrieve_all

Param RequiredComment
country NoUse either the country number or country code required to retrieve services by country.

 

Responses

Success[{"ID":"1","name":"1688"},{"ID":"2","name":"1Q"}]

 

Balance endpoint - https://api.smspool.net/request/balance

Param RequiredComment
keyYesYour 32-character API key

 

Responses

Success{"balance":"1.00"}

 

Order history endpoint - https://www.api.smspool.net/request/history

Param RequiredComment
keyYesYour 32-character API key

 

Responses

Success{[Array of all orders]}

 

My active orders endpoint - https://api.smspool.net/request/active

Param RequiredComment
keyYesYour 32-character API key

 

 

Responses

Success[{"timestamp":"2022-05-24 21:20:07","order_code":"ABCDEFGH","phonenumber":"123456789","code":"0","full_code":"0","short_name":"US","service":"Service","status":"pending","expiry":"1653420607"}]

 

Price endpoint - https://api.smspool.net/request/price

Param RequiredComment
keyYesYour 32-character API key
countryYesThe country code/ID that you can retrieve from the country endpoint
serviceYesThe service ID/name that you can retrieve from the service endpoint

 

Responses

Success{"price":"0.75"}
Fail{"success":0,"message":"Fill in all params!"}
Fail{"success":0,"message":"No price was found for this query.","price":0}

Price endpoint - https://api.smspool.net/request/price

Param RequiredComment
keyYesYour 32-character API key
countryYesThe country code/ID that you can retrieve from the country endpoint
serviceYesThe service ID/name that you can retrieve from the service endpoint

 

Responses

Success{"price":"0.75"}
Fail{"success":0,"message":"Fill in all params!"}
Fail{"success":0,"message":"No price was found for this query.","price":0}

 

Suggested countries endpoint - https://api.smspool.net/request/suggested_countries

Param RequiredComment
serviceYesThe service ID/name that you can retrieve from the service endpoint

 

Responses

Success
[{"pool":1,"country_id":1,"name":"United States","short_name":"US","price":"0.31"},{"pool":7,"country_id":2,"name":"United Kingdom","short_name":"GB","price":"0.10"}]

 

List of all endpoints for ordering

Order SMS endpoint - https://api.smspool.net/purchase/sms

Orders that do not receive an SMS will be refunded automatically.

Param RequiredComment
keyYesYour 32-character API key
countryYesThe country code/ID that you can retrieve from the country endpoint
serviceYesThe service ID/name that you can retrieve from the service endpoint
poolNoThe pool you'd like to order from is not required, in case it's empty it'll automatically select a suitable pool. Pools can be selected by number or by name (for example Alpha)
max_priceNoSet the max price of your order
pricing_optionNoSet the pricing option of your order, 0 = highest success rate, 1 = cheapest option
area_codeNoSet the area code for your order, works for pool Foxtrot (7)

 

 

Responses

Success{"success":1,"number":"123456789","order_id":"ABCDEFG","country":"United States","service":"Service","pool":5,"expires_in":599,"message":""}
Fail{"success":0,"message":"This country is currently not available for this service, please try the following countries: "}
Fail{"success":0,"message":"Insufficient balance, the price is: 0.85 while you only have: 0.00"}
Fail
{"success":0,"errors":[{"message":"Missing or invalid param: country"},{"message":"Missing or invalid param: service"},{"message":"Missing or invalid param: key","description":"Your API key which can be found on your settings page at /my/settings"}]}
Fail{"success":0,"message":"This service is not available for this country."}
Fail{"success":0,"message":"Something went horribly wrong, try again please!"}

 

 

Check SMS endpoint - https://api.smspool.net/sms/check

Param RequiredComment
keyYesYour 32-character API key
orderidYesThe `order_id` you received from the Order SMS endpoint 

 

 

Responses

Success{"status":1,"message":"pending","resend":0,"expiration":1669382268}
Success{"status":2,"message":"expired","resend":0,"expiration":1669382268}
Success{"status":3,"sms":"00000","full_sms":"full SMS","expiration":1669382268}
Success{"status":4,"message":"resend","resend":0,"expiration":1669382268}
Success{"status":5,"message":"cancelled","resend":0,"expiration":1669382268}
Success{"status":6,"message":"refunded","resend":0,"expiration":1669382268}
Fail{"success":0,"message":"We could not find this order!"}

 

 

Resend SMS endpoint - https://api.smspool.net/sms/resend

Param RequiredComment
keyYesYour 32-character API key
orderidYesThe `order_id` you received from the Order SMS endpoint 

 

 

Responses

Success{"success":1,"message":"Number has been requested again","resend":0}
Fail{"success":0,"message":"Phonenumber could not be requested again, try later again.","resend":0}

 

 

Cancel SMS endpoint - https://api.smspool.net/sms/cancel

Param RequiredComment
keyYesYour 32-character API key
orderidYesThe `order_id` you received from the Order SMS endpoint 

 

 

Responses

Success{"success":1}
Fail{"success":0}

 

Archive SMS orders endpoint - https://www.api.smspool.net/request/archive

Param RequiredComment
keyYesYour 32-character API key

Responses

Success{"success":1,"message":"All your inactive orders have been archived."}

Rental endpoints

Retrieve all rentals - https://api.smspool.net/rental/retrieve_all

Param RequiredComment
keyNoYour 32-character API key, is only required if you want to see prices specifically for your account.
typeYesChoose whether the rental is extendable or not

 

 

Responses

Success{"0":{"name":"United States","region":"Americas","pricing":"{\"7\":18,\"14\":25,\"30\":30}"}}
Fail{"success":0,"message":"Fill in all params! [GET: type, key (optional)]"}

The 0 represents the rental ID, this is the ID you need to select in order to order this specific rental.

 

Order rental - https://api.smspool.net/purchase/rental

Param RequiredComment
keyYesYour 32-character API key
idYesThe rental ID was retrieved from the "Retrieve all rentals" endpoint.
daysYesThe number of days you'd like to rent for
service_idNoSpecify a service ID to only purchase a line for that service and get 50% off. Only works for US extendable rentals.

 

 

Responses

Success{"success":1, "message": "", "phonenumber": "123456789", "days": 30, "rental_code":"ABCDEFG", "expiry":"1653758381"}
Fail{"success":0,"message":"The service you entered is not available!"}
Fail{"success":0,"message":"You do not have enough balance, please top up your account with 0.00 dollars in order to purchase this rental."}
Fail{"success":0,"message":"Something has gone wrong, please try later again."}
Fail{"success":0,"message":"You selected a invalid amount of days! The following days are available: 7 14 30 "}

Note: the `rental_code` you get from this endpoint is important, make sure to save it somewhere..

 

Retrieve rental messages - https://api.smspool.net/rental/retrieve_messages

Param RequiredComment
keyYesYour 32-character API key
rental_codeYesThe retrieved rental code from the `Order rental` endpoint.

 

 

Responses

Success{"success":1,"messages":{"0":{"ID":6,"sender":null,"message":"Message 1","timestamp":"11 May 2022 18:39:54"},"1":{"ID":6,"sender":null,"message":"Message 2","timestamp":"11 May 2022 01:11:35"}},"source":"6"}
Fail{"success":0,"message":"No rental was found!"}

 

 

Retrieve rental status - https://api.smspool.net/rental/retrieve_status.php

Param RequiredComment
keyYesYour 32-character API key
rental_codeYesThe retrieved rental code from the `Order rental` endpoint.

 

 

Responses

Success{"success":1,"status":{"expiry":1654495533,"available":1,"phonenumber":"123456789","activeFor":90}}
Fail{"success":0,"message":"No rental was found!"}

Needs to be called every time when activeFor expires for certain rentals.

Note: the available must be 1 before you send a code. Please run this endpoint every time before retrieving your rental messages.

 

Refund rental - https://api.smspool.net/rental/refund.php

Param RequiredComment
keyYesYour 32-character API key
rental_codeYesThe retrieved rental code from the `Order rental` endpoint.

 

 

Responses

Success{"success":1,"message":"Your rental has been refunded!"}
Fail{"success":0,"message":"This number could not be refunded as you already have refunded it."}
Fail{"success":0,"message":"TYou cannot refund a rental after 12 hours or after receiving one message."}

 

 

Extend rental - https://api.smspool.net/rental/extend.php

Param RequiredComment
keyYesYour 32-character API key
daysYesThe amount of days you'd like to extend it with.
rental_codeYesThe retrieved rental code from the `Order rental` endpoint.

 

 

Responses

Success{"success":1,"message":"Your rental has been succesfully extended!"}
Fail{"success":0,"message":"Something went wrong on extending your rental, you have NOT been charged!"}
Fail{"success":0,"message":"You do not have enough balance, please  top up your account with 0.00 dollars in order to purchase this rental."}
Fail{"success":0,"message":"You selected a invalid amount of days! The following days are available: 7 14 30 "}

 

 

 

Return to blog
About the author

Other interesting articles

Notifications
New notifications
You have no new notifications.
Preferences
Color mode
Direction
Audio mode
Prompts