GEThttps://onlinesim.io/api/rent/getRentNum.php

Buy virtual phone number for rent

This request allows you to rent a number of a specific country for SMS receiving.

You can use this request when you need to receive messages from multiple different services or from a single one, but over a long time period.

Security

OAuth2
rent-scope
grants access to renting phone numbers from Onlinesim

Parameters

query5
NameTypeDescription
country*string

Country code (according to countries list)

days*integer

Initial rental period (in days). Valid values are in the days object of the tariffsRent

extensionboolean

Auto-renewal (when enabled, automatically extends the rental for 30 days upon expiration)

Default:true
paginationboolean

Message pagination

langstring

Response language:

fr - French,

de - German,

ru - Russian,

en - English,

zh - Chinese.

Please note that the translation applies only to string field values, such as service names or country names. Field names themselves, error messages, and standard values (for example, true/false for boolean fields) remain in English

Enum:frderuenzhDefault:ru

Responses

200

Successful response for getRentNum request: the server issues a number with requested parameters for rent or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf
One Of
[0]object
[1]object

Examples

Virtual number successfully rentedexample_lines

Returns information about the rental operation

{
  "response": 1,
  "item": {
    "status": 0,
    "messages": {
      "current_page": 1,
      "data": [],
      "from": 1,
      "last_page": 0,
      "per_page": 20,
      "to": 0,
      "total": 0
    },
    "country": 7,
    "rent": 3,
    "extension": 1,
    "checked_time": "2022-07-17 21:41:20",
    "sum": 215.5,
    "number": "9915584307",
    "tzid": 22867974,
    "time": 19,
    "days": 0,
    "hours": 0,
    "extend": {
      "1": 36,
      "3": 108,
      "7": 252,
      "15": 540,
      "30": 1080
    },
    "checked": false,
    "reload": 0,
    "day_extend": 36,
    "m_ext": false,
    "freeze": false
  }
}

Code Samples

Generating examples...