Send SMS to OnlineSIM for rent operation
POSThttps://{ourserver.com}/v1/PUSH_SMS_RENT
The same webhook as PUSH_SMS, sent to the same URL: a service value starting with rent routes the SMS to the rent operation on phone. Rent support depends on the integration.
The first SMS confirms the rent. An SMS from a blocked sender (banks, payment systems, etc.) is shown to the client as a notice instead of the text and does not confirm the rent.
If you get {"status": "SUCCESS"}, the SMS can be marked in your database as delivered (don't send it again).
Business errors are answered with HTTP 200 and {"status": "ERROR", "error": "<code>"}; they are final, do not repeat such requests. If the request fails at the network level or is answered with HTTP 500 (INTERNAL_ERROR), repeat it after a pause (for example, 10 seconds).
Possible errors (the set depends on the integration):
NO_OP- there is no active rent operation on the number;SERVICE_BAN/BANNED- the sender is blocked (the SMS may still be shown to the client as a notice);INTERNAL_ERROR(HTTP 500) - the request could not be processed.
Request Body
PUSH_SMS webhook for a rent number: your server must send this request once an event is triggered (when the rented number has received a message).
application/jsonschemaobject
activationId you returned in GET_NUMBER)≥ 1Example:355@ is cut off)Example:InstagramGET_NUMBER)Example:79088081050Your verification code is 800142PUSH_SMSEnum:PUSH_SMSExample:PUSH_SMSapikeyrent, e.g. rentExample:rentExamples
PUSH_SMS request from your server (for a rented number)
{
"smsId": 124980,
"phoneFrom": "instagram",
"phone": "4605028040",
"text": "784958 is your secret code",
"action": "PUSH_SMS",
"key": "apikey",
"service": "rent"
}Responses
200OnlineSIM server response: the SMS is accepted or rejected with an error code
application/jsonschemaobject
SUCCESSERRORExample:SUCCESSstatus: ERROR)Enum:NO_OPSERVICE_BANBANNEDExample:NO_OPExamples
The SMS is accepted
{
"status": "SUCCESS"
}No active rent operation for this number
{
"status": "ERROR",
"error": "NO_OP"
}The sender is blocked
{
"status": "ERROR",
"error": "SERVICE_BAN"
}500The request could not be processed: repeat it later
application/jsonschemaobject
ERRORExample:ERRORINTERNAL_ERRORExample:INTERNAL_ERROR