Skip to content

POST /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 15 minutes.

The operation can be closed prematurely (check FINISH_ACTIVATION).

WARNING

Your server must issue a number with specified parameters within 10 seconds of the request. Otherwise current request will be cancelled.

WARNING

As we mentioned before, you will have to implement a fucntionality for number's mask exception: optional parameter exceptionPhoneSet might contain an array with exception set. When one does, your server should exclude numbers with matching patters from issuing them.

For example, if [46950] value is passed, your server should not issue numbers of Sweden that start with +46950*

Exception

WARNING

Numbers that are used in one operation cannot be used in other until the previous operation is closed (until FINISH_ACTIVATION request is received).

Queue

Parameters

NameTypeDescription
Authorization*string

see more here

Example:Bearer apikey
Content-Type*string

Content type header and encoding scheme

Enum:application/json; charset=utf-8Example:application/json; charset=utf-8

Request Body

Request payload from Onlinesim server

Content-Type:application/json
Bodyobject
actionstringRequired

Method name, in this case GET_NUMBER

Enum:GET_NUMBER
Default:GET_NUMBER
Example:GET_NUMBER
countrystringRequired

‘Country name, enum (country
list
)’

Example:germany
operatorstringRequired

‘Operator name (for examples take a look at operator
list
)’

Example:any
servicestringRequired

‘Service name, enum (service
list
)’

Example:facebook
sumnumberRequired

Service price, in RUB (this sum will be credited to your
Onlinesim account after successful operation)

Example:40
keystringRequired

API key of your Onlinesim partner’s profile

exceptionPhoneSetinteger[]

List of exception prefixes that SHOULD NOT be issued
when the number is requested. Format: country code +
following digits of a number.

Responses

200

The response of your server for
GET_NUMBER
request must be in following format:

Code Samples