post PUSH_SMS
https://{ourserver.com}/v1/PUSH_SMSIMPORTANT NOTE! URL of Onlinesim server is provided by Onlinesim partner support specialists. Please note, that the URL in the example is just a placeholder.
This is a webhook for sending messages to Onlinesim server. These requests should be sent automatically when your number with active operation has received a message to forward it to Onlinesim server.
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.
IMPORTANT NOTE! Request header should have utf-8 encode scheme placed in 'Content-Type' ('Content-Type': 'application/json; charset=utf-8').
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)
Servers
https://{ourserver.com}Parameters
Content-Typeheader- stringExample:
"application/json; charset=utf-8"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).
- Schema
- Examples
- objectExample:
{"smsId":355,"phoneFrom":"Instagram","phone":"79088081050","text":"Your verification code is 800142","action":"PUSH_SMS","key":"string"}Properties:smsIdintegerRequiredOperation ID (assigned by your server)Example:355>= 1phoneFromstringRequiredName or phone number of a senderExample:"Instagram"phonestringRequiredPhone number with active operation, that has received the SMSExample:"79088081050"textstringRequiredMessage textExample:"Your verification code is 800142"actionstringRequiredMethod name, in this case `PUSH_SMS`Example:"PUSH_SMS"Enum:PUSH_SMSkeystringRequiredAPI key of your Onlinesim partner's profileExample:"string"
Responses
200
- Schema
- Examples
- objectExample:
{"status":"SUCCESS"}Properties:statusstringOnlinesim server response statusExample:"SUCCESS"Enum:SUCCESSERROR