POSThttps://{ourserver.com}/api/resellers/addMessage

Forward received SMS to Onlinesim server

This requests forwards messages that were received by your numbers to our server.

You can filter the messages before sending a request (send only SMS from ordered service) or send all messages, and we will filter them on our side.

You can also block all incoming SMS containing confidential or sensitive information such as SMS with credentials of private account on mobile operator's website and other SMS.

Parameters

header2
NameTypeDescription
Authorization*string

see more here

Content-Type*string

Content type header and encoding scheme

Enum:application/json; charset=utf-8

Request Body

Your server should send this request as soon as number with active operation receives the message (webhook).

Content-Typeapplication/json
Schema
schemaobject
All Of
[0]object
[1]object

Examples

Example payload of your server `addMessage` request
{
  "number": "+234112233445",
  "from": "VKcom",
  "message": "VKcom 111111",
  "date": "1546934787"
}

Responses

200

Onlinesim server response

Content-Typeapplication/json
Schema
schemaobject
responseoneOf

1, if request was successful, otherwise error message will come up

Examples

Onlinesim server response example for `addMessage` request (message successfuly received)
{
  "response": 1
}
Incorrect key passed
[
  {
    "response": "ERROR_WRONG_KEY"
  }
]
400

Bad Request

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

Examples

Incorrect or missing parameters
{
  "response": "ERROR_PARAMS",
  "message": "ERROR_PARAMS"
}
Empty message context
{
  "response": "ERROR_MESSAGE",
  "message": "ERROR_MESSAGE"
}
401

Unauthorized. The request is missing or uses an invalid API key. Some endpoints may return a 200 status with an ERROR_WRONG_KEY message instead of 401 — check the response body

Content-Typetext/plain
Schema
schemastring
Enum:Unauthorized
403

Forbidden. The request was understood but refused due to insufficient permissions

Content-Typeapplication/json
Schema
schemaobject
errorobjectRequired
messagestringRequired
Enum:ERROR_DISABLEDERROR_IPERROR_RENT
detailsobject[]Required
404

Not Found

Content-Typetext/html
Schema
schemastring

Examples

Message was filtered out by the server
NO_OPERATION

Code Samples

Generating examples...