Onlinesim will send a request to your URL
↓ POST
https:///newSmsWebhook newSmsWebhook
Receive SMS via webhook
We've added a webhook feature for you! You can set a URL in your profile settings and as soon as we get SMS for any number that you've ordered, it will be forwarded to you.
This works for both single-service activations and long term rental!
.png)
The schema of the incoming payload is described below in the Incoming payload section
Incoming payload
Required
SMS payload sent by Onlinesim to your webhook URL
Content-Type
application/jsonSchema
Bodyobject
Bodyobject
user_idstring
country_codestring
numberstring
senderstring
messagestring
time_startstring
time_leftstring
operation_idstring
webhook_typeobject
codestring
Examples
Incoming SMS
Incoming SMS webhook payload
{
"user_id": "204355",
"country_code": "7",
"number": "+79918397701",
"sender": "OKru",
"message": "текст смс",
"time_start": "2023-04-26 12:37:55",
"time_left": "880",
"operation_id": "91763432",
"webhook_type": "receiving_sms",
"code": "612045"
}Your server response
200Your server should respond with HTTP 200 OK to acknowledge receipt
Your server should respond with HTTP 200 OK to acknowledge receipt