How to use the SMSPool API

  • By Admin
  • 2021-12-20 22:53:57

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://smspool.net/api/ 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 are in GET

What are the API endpoints?

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


List of all informative endpoints

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

Param  Required Comment
country  No Use either the country number or country code required to retrieve services by country.

 

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

Param  Required Comment
country  No Use either the country number or country code required to retrieve services by country.

 

 

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

Param  Required Comment
key Yes Your 32-character API key

 

 

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

Param  Required Comment
key Yes Your 32-character API key
country Yes The country code/ID that you can retrieve from the country endpoint
service Yes The service ID/name that you can retrieve from the service endpoint

 


 

List of all endpoints for ordering

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

Param  Required Comment
key Yes Your 32-character API key
country Yes The country code/ID that you can retrieve from the country endpoint
service Yes The service ID/name that you can retrieve from the service endpoint
pool No The pool you'd like to order from, 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)

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

Param  Required Comment
key Yes Your 32-character API key
orderid Yes The `order_id` you received from the Order SMS endpoint 

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

Param  Required Comment
key Yes Your 32-character API key
orderid Yes The `order_id` you received from the Order SMS endpoint 

 

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

Param  Required Comment
key Yes Your 32-character API key
orderid Yes The `order_id` you received from the Order SMS endpoint 

 


Rental endpoints

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

Param  Required Comment
key No Your 32-character API key, only required if you want to see prices specifically for your account.
type Yes Either 1 or 0, 1 being extendable and 0 being unextendable

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

Param  Required Comment
key Yes Your 32-character API key
id Yes The rental ID was retrieved from the "Retrieve all rentals" endpoint.
days Yes The number of days you'd like to rent for

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

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

Param  Required Comment
key Yes Your 32-character API key
rental_code Yes The retrieved rental code from the `Order rental` endpoint.

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

Param  Required Comment
key Yes Your 32-character API key
rental_code Yes The retrieved rental code from the `Order rental` endpoint.

 

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

Return to blogs