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 http://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

http://api.sms-man.com/rent-api/get-balance?token=$token

Parameters

Parameter Type Required Value
token String Yes Your API key

Result

{"balance":"799.70"}

Possible errors

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

Get list of all countries

http://api.sms-man.com/rent-api/limits?token=$token&country_id=$country_id&type=$type&time=$time

Parameters

Parameter Type Required Value
token String Yes Your API key
country_id Integer Yes
Number country
type String Yes hour / day / week / month
time String Yes Rental 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

http://api.sms-man.com/rent-api/get-number?token=$token&country_id=$country_id&type=$type&time=$time

Parameters

Parameter Type Required Value
token String Yes Your API key
country_id Integer No
Number country
type String Yes hour / day / week / month
time String Yes Rental Time

Result

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

Possible errors

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

Change status

http://api.sms-man.com/rent-api/set-status?token=$token&request_id=$request_id&status=$status

Parameters

Parameter Type Required Value
token String Yes Your API key
request_id Integer Yes Request ID
status String Yes cancel - cancel of the rent / close - 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

http://api.sms-man.com/rent-api/get-sms?token=$token&request_id=$request_id

Parameters

Parameter Type Required Value
token String Yes Your API key
request_id Integer Yes Request 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

http://api.sms-man.com/rent-api/get-all-sms?token=$token&request_id=$request_id

Parameters

Parameter Type Required Value
token String Yes Your API key
request_id Integer Yes Request 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

http://api.sms-man.com/rent-api/get-all-requests?token=$token

Parameters

Parameter Type Required Value
token String Yes Your 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!"}
{{country.title}}
{{country.id}}
logo {{service.title}}
{{service.id}}