For developers

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

API v2.0

API is a protocol of interaction between your software and our activation server. The API is needed in order to automate the process of receiving SMS messages on your side To work with the API, you must use your API key, you can get it by going to the profile page. Our software is fully compatible with competitor sites

API Protocol Description

All requests should go to https://api.sms-man.com/control/ POST or GET request. All requests must have an API key in the form of the token parameter


Balance request

Parameters

Field
Type
Required
Value
tokenStringyesYour API key

Result

{
  "balance": "799.70"
}

Possible errors

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

Get limits

Parameters

Field
Type
Required
Value
tokenStringyesYour API key
country_idIntegerno
application_idIntegerno

Result

[
  {"application_id":"1","country_id":"1","numbers":"32302"},
  {"application_id":"1","country_id":"2","numbers":"3494"}
]

Possible errors

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

Request a phone number

Parameters

to select a random country, use country_id=0

Field
Type
Required
Value
tokenStringyesYour API key
country_idIntegerno
application_idIntegeryes
maxPriceIntegernoyour desired value
currencyStringnoRUB/USD/EUR
refStringnoPass the referral ID
hasMultipleSmsStringnoTrue/False

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!"}
}

Get sms

Parameters

Field
Type
Required
Value
tokenStringyesYour API key
request_idIntegeryesRequest ID

Result

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

Possible errors

{
  "request_id": 1,
  "country_id": 1,
  "application_id": 1,
  "number": "79002415539",
  "error_code": "wait_sms",
  "error_msg": "Still waiting..."
}

Change request status

Parameters

Field
Type
Required
Value
tokenStringyesYour API key
request_idIntegeryesRequest ID
statusStringyesready / close / reject / used

Result

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

Possible errors

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

{
  "success": false,
  "error_code": "wrong_status",
  "error_msg": "Status $status does not exists"
}

Get current prices

Parameters

Field
Type
Required
Value
tokenStringyesYour API key
country_idIntegerno

Result

{
  "0": {"1":{"cost":"15","count":6455},"2":{"cost":"50","count":124}},
  "1": {"3":{"cost":"6","count":1000}}
}

Possible errors

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

Get list of all countries

Parameters

Field
Type
Required
Value
tokenStringyesYour API key

Result

[
  {"id":0,"title":"Russia"},
  {"id":3,"title":"China"}
]

Possible errors

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

Get list of all services

Parameters

Field
Type
Required
Value
tokenStringyesYour API key

Result

[
  {"id":"1","name":"Vkontakte","code":"vk"},
  {"id":"2","name":"WeChat","code":"wb"},
  {"id":"3","name":"Telegram","code":"tg"}
]

Possible errors

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