post
{yourserver}/getNumberPOST /getNumber
Order a virtual number for the specified service
Request for ordering a number for SMS receiving from a specified service.
This request is sent to your server to order a number with specific parameters to receive SMS from a single service for short period (default is 15 minutes).
The operation can be closed prematurely (check FINISH_ACTIVATION).
Parameters
header2
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Content-Type* | string |
Enum: application/json; charset=utf-8 |
Request Body
Request payload from Onlinesim server
Content-Type
application/jsonSchema
Bodyobject
Bodyobject
actionstringRequired
countrystringRequired
operatorstringRequired
servicestringRequired
sumnumberRequired
keystringRequired
exceptionPhoneSetinteger[]
exceptionPhoneSetinteger[]
itemsinteger
Examples
Example payload of Onlinesim server GET_NUMBER request
{
"action": "GET_NUMBER",
"country": "russia",
"operator": "any",
"service": "vk",
"sum": 40,
"key": "apikey"
}Responses
200The response of your server for
GET_NUMBER
request must be in following format:
The response of your server for GET_NUMBER request must be in following format:
Content-Type
application/jsonHeaders
| Name | Type | Description |
|---|---|---|
Content-Type | string |
|
Schema
Responseobject
Responseobject
numberintegerRequired
activationIdintegerRequired
statusstringRequired
Examples
Successful response example from your server
{
"number": 79281234567,
"activationId": 355,
"status": "SUCCESS"
}No available numbers response example from your server
{
"number": null,
"activationId": null,
"status": "NO_NUMBERS"
}Response example from your server in case of other types of errors
{
"number": null,
"activationId": null,
"status": "ERROR"
}Code Samples
Generating examples...