For developers

This is the section with API documentation for connecting your service to SMS-Man and automatic number purchasing.

Rent API

API is the protocol for communication between your software and our number rental server.

API Protocol Description

All requests must go to https://api.sms-man.com/rent-api/ GET request. All requests must include the API key as a parameter token All answers are in json format.


Balance request

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key

Result

{
  "balance": "799.70"
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Get limits

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key
country_idIntegerYes
typeStringYeshour / day / week / month
timeStringYesRental Time

Result

{
  "type": "hour",
  "time": "4",
  "limits": [
    {"country_id":"1","count":"127","cost":"151.68"},
    {"country_id":"2","count":"49","cost":"113.56"},
    {"country_id":"4","count":"0","cost":"151.68"}
  ]
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Ordering a number to rent

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key
country_idIntegerYes
typeStringYeshour / day / week / month
timeStringYesRental Time

Result

{
  "request_id": 1,
  "country_id": 1,
  "number": "79002415539"
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Ordering a partial number for rent

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key
country_idIntegerYes
application_idIntegerYes
typeStringYeshour / day / week / month
timeStringYesRental Time

Result

{
  "request_id": 1,
  "country_id": 1,
  "application_id": 1,
  "number": "79002415539"
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Change status

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key
request_idIntegerYesRequest ID
statusStringYesclose - terminate the rent

Result

{
  "request_id": 1,
  "success": true
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Receive the last text message

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key
request_idIntegerYesRequest ID

Result

{
  "request_id": "10",
  "country_id": 1,
  "number": "79633002801",
  "sms": {"message":"message","code":"code","time":"2020-12-12 14:50:31"}
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Receive all sms

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API key
request_idIntegerYesRequest ID

Result

{
  "request_id": "10",
  "country_id": 1,
  "number": "79633002801",
  "sms": [
    {"message":"message","code":"code","time":"2020-12-12 14:50:31"}
  ]
}

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}

Get a list of all numbers

Parameters

Parameter
Type
Required
Value
tokenStringYesYour API KEY

Result

[
  {"id":1,"country_id":1,"number":"79002415539","status":"cancel"}
]

Possible errors

{
  "success": false,
  "error_code": "wrong_token",
  "error_msg": {"token":"Wrong token!"}
}