API Documentation
Requesting balance information
https://shortnum.com/api/sms/getbalance?api_key=APIKEY
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
Output
Server response | Example | Description |
---|---|---|
ACCESS_BALANCE:BALANCE | ACCESS_BALANCE:500 | BALANCE - your account balance |
Possible mistakes
Server response | Description |
---|---|
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Order number
https://shortnum.com/api/sms/getnumber?api_key=APIKEY&service=SERVICE&country=COUNTRY&operator=OPERATOR
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
SERVICE | List of services in the left menu | Yes | Service for which you need to get number |
COUNTRY | List of countries in the left menu | Yes | Country number to get |
OPERATOR | Accepted parameters depend on the specific country. For clarification, see the list of operators on the left menu | No | Cellular operator whose number you need to get |
Server Responses
Server response | Example | Description |
---|---|---|
NO_NUMBERS | NO_NUMBERS | There are no numbers with the specified parameters, try again later, or change the operator, country. |
NO_BALANCE | NO_BALANCE | Account balance ran out of money |
WRONG_SERVICE | WRONG_SERVICE | Invalid service identifier |
ACCESS_NUMBER:ID:NUMBER | ACCESS_NUMBER:1:79123456789 | Received a number, activation ID - ID, number itself with country code - NUMBER |
Possible mistakes
Server response | Description |
---|---|
BAD_SERVICE | Incorrect service name |
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Cancel number
https://shortnum.com/api/sms/cancelnumber?api_key=APIKEY&id=ID
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
ID | Numerical value | Yes | Activation ID received when requesting the number |
Server Responses
Server response | Description |
---|---|
ACCESS_CANCEL | Activation canceled |
STATUS_CANCEL | Activation canceled |
Possible mistakes
Server response | Description |
---|---|
NO_ACTIVATION | Activation ID does not exist |
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Get status
https://shortnum.com/api/sms/getstatus?api_key=APIKEY&id=ID
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
ID | Numerical value | Yes | Activation ID received when requesting the number |
Server Responses
Server response | Description |
---|---|
STATUS_WAIT_CODE | We are waiting for the arrival of SMS |
STATUS_CANCEL | Activation canceled |
STATUS_OK:CODE | Code received (where CODE - activation code) |
Possible mistakes
Server response | Description |
---|---|
NO_ACTIVATION | Activation ID does not exist |
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Get prices
https://shortnum.com/api/sms/getprices?api_key=APIKEY&service=SERVICE&country=COUNTRY
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
SERVICE | List of services in the left menu | No | Service for which you need to get number |
COUNTRY | List of countries in the left menu | No | Country number |
Server Responses
Server response | Description |
---|---|
JSON response | Answer in format { "Country": { "Service": { "price": Price, "count": Quantity, }}} |
Possible mistakes
Server response | Description |
---|---|
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Get countries
https://shortnum.com/api/sms/getcountries?api_key=APIKEY
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
Server Responses
Server response | Description |
---|---|
JSON response | Answer in format [{ "name": name, "code": Code }] |
Possible mistakes
Server response | Description |
---|---|
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Get services
https://shortnum.com/api/sms/getservices?api_key=APIKEY
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
Server Responses
Server response | Description |
---|---|
JSON response | Answer in format [{ "name": name, "code": Code }] |
Possible mistakes
Server response | Description |
---|---|
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |
Get operators
https://shortnum.com/api/sms/getoperators?api_key=APIKEY
Option | Accepted values | Obligation | Description |
---|---|---|---|
APIKEY | yo3bPrzepLDAgcU7bFwfvmnYtdMGA | Yes | API-key provides access to paid services |
Server Responses
Server response | Description |
---|---|
JSON response | Answer in format [{ "name": name, "code": Code }] |
Possible mistakes
Server response | Description |
---|---|
BAD_KEY | Invalid API key |
ERROR_SQL | SQL server error |