post PUSH_SMS

https://{ourserver.com}/v1/PUSH_SMS
webhooks

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

This is a webhook for sending messages to Onlinesim server. These requests should be sent automatically when your number with active operation has received a message to forward it to Onlinesim server.

If you get a response with 200(OK) status, SMS can be marked in your database as successfully delivered (don't send message again).

If response is different from 200, then in 10 seconds another request with the same context should be sent, unless it's NO_OPERATION or BAD_SERVICE error.

IMPORTANT NOTE!
Request header should have utf-8 encode scheme placed in 'Content-Type'
('Content-Type': 'application/json; charset=utf-8').

Following responses with errors are possible:
NO_OPERATION / NO_OP - this error occurs when you try to push SMS for a number that has no active operation;
BAD_SERVICE - this error occurs when you try to push SMS from a service that is banned by our server (banks, payment systems, etc.);
IGNORED - this error occurs when you try to push SMS from a service that is differs from the one the client has ordered (only appears when filtration is done on our side);
SERVICE_BAN - this error occurs when you try to push SMS from the service you've blacklisted (you can add services to the blacklist, it prevents users to order your numbers for these services)

Servers

https://{ourserver.com}

Parameters

Authorization
Required

see more here

In: header
Schema:
  • string
    Example: "Bearer apiKey"
Content-Type
Required
`Content type` header and encoding scheme
In: header
Schema:
  • string
    Example: "application/json; charset=utf-8"
    Enum: application/json; charset=utf-8

Request Body

PUSH_SMS webhook: your server must send this request once an event is triggered (when the ordered number has received a message).

Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"smsId":355,"phoneFrom":"Instagram","phone":"79088081050","text":"Your verification code is 800142","action":"PUSH_SMS","key":"string"}
    Properties:
    • smsId
      integer
      Required
      Operation ID (assigned by your server)
      Example: 355
      >= 1
    • phoneFrom
      string
      Required
      Name or phone number of a sender
      Example: "Instagram"
    • phone
      string
      Required
      Phone number with active operation, that has received the SMS
      Example: "79088081050"
    • text
      string
      Required
      Message text
      Example: "Your verification code is 800142"
    • action
      string
      Required
      Method name, in this case `PUSH_SMS`
      Example: "PUSH_SMS"
      Enum: PUSH_SMS
    • key
      string
      Required
      API key of your Onlinesim partner's profile
      Example: "string"

Responses

200

Onlinesim server response
Headers
Content
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"status":"SUCCESS"}
    Properties:
    • status
      string
      Onlinesim server response status
      Example: "SUCCESS"
      Enum: SUCCESS ERROR

404

`NO_OPERATION` / `NO_OP` This error occurs when you try to push SMS for a number that has no active operation

429

`TOO_MANY_ATTEMPTS` This error occurs when you send too many request in a short period of time