Send SMS to Onlinesim for rent operation

POSThttps://{ourserver.com}/v1/PUSH_SMS_RENT

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.

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)

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

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

Content-Typeapplication/json
Schema
schemaobject
smsIdintegerRequired
Operation ID (assigned by your server)≥ 1
phoneFromstringRequired
Name or a phone number of a sender
phonestringRequired
Phone number with active operation, that has received the SMS
textstringRequired
Message text
actionstringRequired
Method name, in this case PUSH_SMSEnum:PUSH_SMSDefault:PUSH_SMS
keystringRequired
API key of your Onlinesim partner's profile
servicestringRequired
Service name, for long term rental always rentEnum:rent

Examples

Example payload of your server request (for rental number)
{
  "smsId": 124980,
  "phoneFrom": "instagram",
  "phone": "4605028040",
  "text": "784958 is your secret code",
  "action": "PUSH_SMS",
  "key": "apikey",
  "service": "rent"
}

Responses

200Onlinesim server response
Content-Typeapplication/json
Schema
schemaobject
statusstring
Onlinesim server response statusEnum:SUCCESSERROR

Examples

Onlinesim server response example for PUSH_SMS request (for rental number)
{
  "status": "SUCCESS"
}
When pushing SMS to a number that has no active operation
NO_OP
When pushing SMS from a service that is banned by our server (banks, payment systems, etc.)
BAD_SERVICE
When pushing SMS from a service that is differs from the one the client has ordered (only appears when filtration is done on our side)
IGNORED
When pushing SMS from a service you've added to the blacklist
SERVICE_BAN
When rate limit for PUSH_SMS_RENT requests is exceeded
TOO_MANY_ATTEMPTS

Code Samples

Generating examples...