profile

Receive SMS via webhook

Onlinesim will send a request to your URL

↓ POSThttps:///newSms

Set a URL in your profile settings (or with webhook_url of profile.php), and every SMS received by your numbers is sent to it as a JSON POST.

Works for both single-service activations and rent.

Webhook

Incoming payload

Required

SMS payload sent by Onlinesim to your webhook URL

Content-Typeapplication/json
Schema
schemaobjectBody of the newSms webhook (the same object is params in webhook-logs). All fields are always present.
webhook_typestringRequired
receiving_sms — single-service activation, rent_sms — rentEnum:receiving_smsrent_sms
operation_idintegerRequired
Operation ID (tzid)Example:91763432
user_idintegerRequired
Your profile IDExample:100001
country_codeintegerRequired
Country dialing code of the number, see the Code column of the country list. For single-service activations it may be an internal code of a special number pool (for example 1000).Example:7
numberstringRequired
Single-service activation: + and the full number, or hidden when the number is not shown. Rent: the full number in digits, without +.Example:+79001234567
senderstringRequired
Sender name or number. For single-service activations it may be the service code instead (for example vkcom).Example:VK
messagestringRequired
SMS text. For rent, an SMS from a sender the service does not accept is replaced with a notice text.Example:VK: 195895 is your code
codestringRequired
Confirmation code found in the SMS text; empty string when none was foundExample:195895
time_startstringRequired
Single-service activation: time the operation was ordered. Rent: time the SMS was received. Format YYYY-MM-DD HH:MM:SS.Example:2026-04-26 12:37:55
time_leftintegerRequired
Remaining operation time: in seconds for single-service activations, in minutes for rentExample:880

Examples

Incoming SMS

SMS of a single-service activation

{
  "user_id": 100001,
  "country_code": 7,
  "number": "+79001234567",
  "sender": "VK",
  "message": "VK: 195895 is your code",
  "time_start": "2026-04-26 12:37:55",
  "time_left": 880,
  "operation_id": 91763432,
  "webhook_type": "receiving_sms",
  "code": "195895"
}

Your server response

200Answer HTTP 200 to acknowledge receipt