post addNumber

https://{ourserver.com}/api/resellers/addNumber
v2

IMPORTANT NOTE! &br; URL of Onlinesim server is provided by Onlinesim partner support specialists. Please note, that the URL in the example is just a placeholder.

This request allows you to add numbers to the Onlinesim server by one at a time, on the contrary to sendNumbersOnline that sends all active numbers as a list.

This could be especially useful if you need to add new numbers to the list of existing ones, instead of passing the modified list every time when you add new numbers.

IMPORTANT NOTE! &br; Enabling rent parameter (by assigning value 1 to it) allows clients to rent your number for a longer period, significantly increasing your income. &br; However you need to contact partner support to get a detailed information on terms and requirements before we enable it for your account.

Servers

https://{ourserver.com}

Parameters

Authorization
Required

see more here

In: header
Schema:
  • string
    Example: "Bearer apiKey"

Request Body

Adding new numbers to the list of existing ones on Onlinesim server.
Content Type:
application/json
  • Schema
  • Examples
  • object
    Payload schema
    Example: {"number":"+4695000051","country_id":46,"port_id":"Port1","rent":0,"operator":24012,"date_start":1658209063}
    Properties:
    • number
      string
      Required

      Number in international format (with + sign)

      Example: "+4695000051"
    • country_id
      integer
      Required

      Country code (according to Е.164 standard, without + sign)

      Example: 46
      >= 1
    • port_id
      string
      Unique port name, this name will be displayed in our interface on your personal web-page. &br; Unless specified defaults to phone number value (value of `number` parameter)
      Example: "Port1"
      Maximum number of items: 100
    • rent
      integer
      Required

      Rent mode for this number: &br; 1 - enabled, &br; 0 - disabled

      Example: 0
      Enum: 0 1
    • operator
      integer
      MCC + MNC operator code (first 5 digits of IMSI)
      Example: 24012
    • date_start
      integer
      Date and time of placement (UNIX timestamp)
      Example: 1658209063

Responses

200

Onlinesim server response
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"response":1,"ids":{"#number#":0}}
    Properties:
    • response
      mixed
      1, if request was successful, otherwise error message will come up
      Example: 1
      One Of:
      • string
        Example: "string"
      • integer
        Example: 0
    • ids
      object
      Example: {"#number#":0}

400

Bad Request
Content Type:
text/html
  • Schema
  • Examples
  • string
    Example: "string"