{"info":{"_postman_id":"2ee41a7c-525f-4c5e-a813-9dcdb1a7c585","name":"Alternative API examples","description":"<html><head></head><body><h2 id=\"general-description\">General description</h2>\n<p>Alternative API for integration with Onlinesim.</p>\n<p>This API will allow you to access two main services of Onlinesim: rent numbers to receive SMS from multiple different senders and receiving SMS from a single specific service.</p>\n<blockquote>\n<p><strong>This API is available for registered Onlinesim users only!</strong><br>You need to have Onlinesim profile to be able to access this API. Several methods of authentication are available (see <a href=\"https://onlinesim.io/openapi_docs/onlinesim-api-un/auth\">Authorization</a>), but we will use API key authentication in this documentation for reasons of simplicity.<br><strong>Receiving messages from payment services, banks, and other financial institutions is not available on our platform. For more detailed information, including a list of such services, please refer to the</strong> <a href=\"https://onlinesim.io/documentation/offer\"></a><a href=\"https://onlinesim.io/openapi_docs/onlinesim-api-un/auth\">Public offer</a><strong>.</strong> </p>\n</blockquote>\n<h3 id=\"list-of-api-requests\">List of API requests</h3>\n<p>Requests are specific for each service and allocated in corresponding sections:</p>\n<h4 id=\"profile-section\">Profile section</h4>\n<p>These requests are related to the profile or both services provided by Onlinesim</p>\n<ul>\n<li><p><strong>getBalance</strong> - returns current balance of your Profile;</p>\n</li>\n<li><p><strong>getCountries</strong> - returns a list of countries and general information on what services are available.</p>\n</li>\n</ul>\n<h4 id=\"single-service-activations-section\">Single-service activations section</h4>\n<p>Allows you to order a number to receive an unlimited number of SMS from a single service within a short time window (15 minutes for most of the services). Please note that you cannot change the service during the operation. To receive SMS from different services, you will need to order new numbers with the appropriate parameters.</p>\n<ul>\n<li><p><strong>getNumbersStatus</strong> - requests a list of available numbers grouped by country and service;</p>\n</li>\n<li><p><strong>getNumber</strong> - orders a number of a chosen country and service to receive SMS;</p>\n</li>\n<li><p><strong>getStatus</strong> - returns a list of received SMS activation codes;</p>\n</li>\n<li><p><strong>getFullSms</strong> - returns a list of received SMS with full text;</p>\n</li>\n<li><p><strong>setStatus</strong> - set a status of the operation (cancel an order, close the operation prematurely, etc).</p>\n</li>\n</ul>\n<h4 id=\"rent-section\">Rent section</h4>\n<p>This service implies that the number will be used to receive SMS from multiple different senders (including SMS from other mobile numbers), except for those that are prohibited.</p>\n<ul>\n<li><p><strong>getRentServicesAndCountries</strong> - requests a list of countries with available for rent mobile numbers;</p>\n</li>\n<li><p><strong>getRentNumber</strong> - orders a number of a chosen country for rent for a certain period;</p>\n</li>\n<li><p><strong>getRentList</strong> - returns a list of numbers of your profile with current active rent;</p>\n</li>\n<li><p><strong>getRentStatus</strong> - returns a list of received messages;</p>\n</li>\n<li><p><strong>setRentStatus</strong> - closes the rental number.</p>\n</li>\n</ul>\n<p>Each request has its own description, type, endpoint's URL, parameters, request and response schemas. Some responses can have examples of specific errors that might appear.<br>Responses are represented in JSON or TXT format based on method called and results.</p>\n<h3 id=\"common-exceptions\">Common exceptions</h3>\n<p>Common errors for all API methods in TXT format.</p>\n<p><code>TEXT_ERROR</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>TEXT_ERROR</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>BAD_KEY</code></td>\n<td>API key is invalid or missing</td>\n</tr>\n<tr>\n<td><code>BAD_ACTION</code></td>\n<td>Unhandled exception</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"283141","collectionId":"2ee41a7c-525f-4c5e-a813-9dcdb1a7c585","publishedId":"2sB3dSRUqy","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-12-12T15:02:05.000Z"},"item":[{"name":"Profile","item":[{"name":"getBalance","id":"a27f74e5-e483-40f0-af09-29a3e9e56b32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getBalance&api_key={{api_key}}","description":"<p>This request can be used to get your current balance. You might use it to check the balance of the profile to top it up when needed or to handle <code>WARNING_LOW_BALANCE</code> exceptions.</p>\n<p>Response schema (text/html):</p>\n<blockquote>\n<p>ACCESS_BALANCE:{sum} </p>\n</blockquote>\n<p>{sum} - current profile's balance in USD</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getBalance</code></p>\n","type":"text/plain"},"key":"action","value":"getBalance"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"}],"variable":[]}},"response":[{"id":"8d44cbc0-e611-4254-845e-81a9a1e3c8be","name":"getBalance","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getBalance&api_key={{api_key}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getBalance","description":"Method name, in this case `getBalance`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"ACCESS_BALANCE:530.82"}],"_postman_id":"a27f74e5-e483-40f0-af09-29a3e9e56b32"},{"name":"getCountries","id":"e1e59ed6-a5f9-4292-b031-a373b29f351f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getCountries&api_key={{api_key}}","description":"<p>This request returns a set of data needed for ordering a number on our service. You can also use it to retrieve a list of all available countries with detailed information of their ID and available services.</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getCountries</code></p>\n","type":"text/plain"},"key":"action","value":"getCountries"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"}],"variable":[]}},"response":[{"id":"f748aa18-4352-41d9-8adc-0e5d69d7f133","name":"getCountries","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getCountries&api_key={{api_key}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getCountries","description":"Method name, in this case `getCountries`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\r\n  \"1\":{   //International phone country code (Е.164 standard, without \"+\" sign)\r\n    \"id\": 187, //Country ID (auxillary field, position of a country in the list of our website)\r\n    \"rus\": \"США\", //Country name in Russian\r\n    \"eng\": \"USA\", //Country name in English \r\n    \"chn\": \"美国（物理)\", //Country name in Chinese\r\n    \"visible\": 1, //Country visibility scope (availability for order, always `1` - available), enum: 0, 1\r\n    \"retry\": 0, //**DEPRECATED** Availability for repeated SMS receiving (always `0` - unavailable), enum: 0, 1\r\n    \"rent\": 1, //**DEPRECATED** Country availability for rent (where `1` is available), enum: 0, 1\r\n    \"multiService\": 0 //**DEPRECATED** Availability for multi-service function (use getRentNumber to receive messages from multiple services)\r\n\r\n  }\r\n}"}],"_postman_id":"e1e59ed6-a5f9-4292-b031-a373b29f351f"}],"id":"7cf4cb70-1644-47dc-b4d9-c9a25ec2ac21","description":"<p>Contains requests that are related to the user's profile or both services provided by Onlinesim.</p>\n<h4 id=\"following-requests-are-available\">Following requests are available:</h4>\n<ul>\n<li><p><strong>getBalance</strong> - returns current balance of your profile;</p>\n</li>\n<li><p><strong>getCountries</strong> - returns a set of data needed for ordering a number on our service. You can also use it to retrieve a list of all available countries with detailed information of their ID and available services.</p>\n</li>\n</ul>\n","_postman_id":"7cf4cb70-1644-47dc-b4d9-c9a25ec2ac21"},{"name":"Single-service activations","item":[{"name":"getNumbersStatus","id":"2c3dec9a-31c3-4ba8-a5b7-759750456a71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getNumbersStatus&api_key={{api_key}}","description":"<p>This request returns a list of available numbers by country and service.  </p>\n<p>You might want to use it to check if the numbers of desired country are available for order and if so, how many.</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getNumbersStatus</code></p>\n","type":"text/plain"},"key":"action","value":"getNumbersStatus"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"disabled":true,"description":{"content":"<p>International phone country code (Е.164 standard, without \"+\" sign)</p>\n","type":"text/plain"},"key":"country","value":"{{countryCode}}"}],"variable":[]}},"response":[{"id":"52c82e86-6b89-43dc-aa2e-344bb46c323a","name":"getNumbersStatus","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getNumbersStatus&api_key={{api_key}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getNumbersStatus","description":"Method name, in this case `getNumbersStatus`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"country","value":"{{countryCode}}","description":"International phone country code (Е.164 standard, without \"+\" sign)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{                 //{value} numbers of {countryCode} for {service} are available\n    \"vk_0\": 2016, //2016 numbers of Russia for VK are available\n    \"fb_0\": 0, //0 numbers of Russia for VK are available, and so on...\n    \"ma_0\": 28,\n    \"vi_0\": 2006,\n    \"ok_0\": 28,\n    \"ig_0\": 0,\n    \"go_0\": 2015,\n    \"ya_0\": 0,\n    \"mb_0\": 2028,\n    \"tw_0\": 2000,\n    \"wa_0\": 0\n}"}],"_postman_id":"2c3dec9a-31c3-4ba8-a5b7-759750456a71"},{"name":"getNumber","id":"c05aed33-86a5-4b56-9436-ed3a0d335b32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getNumber&api_key={{api_key}}&service={{service}}&country={{countryId}}","description":"<p>This request allows you to order a phone number of a specific country to receive SMS from a selected service. This is the main service provided by Onlinesim: you can use virtual numbers to receive verification codes or any other information contained in SMS messages.</p>\n<blockquote>\n<p><strong>IMPORTANT NOTE!</strong><br />Please note, that number is issued for 15 minutes (time period depends on the country and service and can differ) and after the operation is closed this number will not be available. </p>\n</blockquote>\n<p>Response schema (text/html):</p>\n<blockquote>\n<p>ACCESS_NUMBER:{operationId}:{number} </p>\n</blockquote>\n<p>{operationId} - ID of the operation;<br />{number} - phone number in international format</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getNumber</code></p>\n","type":"text/plain"},"key":"action","value":"getNumber"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Service slug (short service name, required upon ordering a number, according to getNumbersStatus response)</p>\n","type":"text/plain"},"key":"service","value":"{{service}}"},{"description":{"content":"<p>Country ID, according to getCountries response</p>\n","type":"text/plain"},"key":"country","value":"{{countryId}}"},{"disabled":true,"description":{"content":"<p>Array for mask exception (including the country code)</p>\n<p>For example: with value [911,912123] won''t issue numbers of India, that start with 911* and 912123*</p>\n","type":"text/plain"},"key":"phoneException","value":"[{{maskExceptionSet}}]"}],"variable":[]}},"response":[{"id":"c8626ee8-2093-48a5-bd9f-8e717e653d60","name":"getNumber","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getNumber&api_key={{api_key}}&service={{service}}&country={{countryId}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getNumber","description":"Method name, in this case `getNumber`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"service","value":"{{service}}","description":"Service slug (short service name, required upon ordering a number, according to getNumbersStatus response)"},{"key":"country","value":"{{countryId}}","description":"Country ID, according to getCountries response"},{"key":"phoneException","value":"[{{maskExceptionSet}}]","description":"Array for mask exception (including the country code)\n            \nFor example: with value [911,912123] won''t issue numbers of India, that start with 911* and 912123*","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"ACCESS_NUMBER:65904893:44910000000"}],"_postman_id":"c05aed33-86a5-4b56-9436-ed3a0d335b32"},{"name":"getStatus","id":"f3579a2e-2f08-4e94-b901-d0864cf47e0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getStatus&api_key={{api_key}}&id={{operationId}}","description":"<p>This request returns a short code contained in SMS received by the specified number (to see the full text of the message, check getFullSms request).</p>\n<p>This request can be used when you're sure that no other information in message is worth to store or use in future, other than a code. Otherwise consider using getFullSms request.</p>\n<p>Response schema (text/html):</p>\n<blockquote>\n<p>STATUS_OK:{operationId} </p>\n</blockquote>\n<p>{operationId} - ID of the operation</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getStatus</code></p>\n","type":"text/plain"},"key":"action","value":"getStatus"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Operation ID (according to getNumber or getStatus responses)</p>\n","type":"text/plain"},"key":"id","value":"{{operationId}}"}],"variable":[]}},"response":[{"id":"f0880a3f-42a3-40c1-96f0-8ad345521cc7","name":"getStatus","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getStatus&api_key={{api_key}}&id={{operationId}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getStatus","description":"Method name, in this case `getStatus`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"id","value":"{{operationId}}","description":"Operation ID (according to getNumber or getStatus responses)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"STATUS_OK:877613"}],"_postman_id":"f3579a2e-2f08-4e94-b901-d0864cf47e0a"},{"name":"getFullSms","id":"a83bee68-f04e-465b-b23f-01c595a60d0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getFullSms&api_key={{api_key}}&id={{operationId}}","description":"<p>This request returns a full context of received SMS of a given number.</p>\n<p>You might want to use this request when provided by getStatus information is not enough to comprehence or you need some data that is contaied in the message, for example when SMS contains not only a verification code, but also the link for promocode, date and time of receipt or any other information that you want to use in your application.</p>\n<p>Response schema (text/html):</p>\n<blockquote>\n<p>FULL_SMS:[{sender}] {smsText} </p>\n</blockquote>\n<p>{sender} - name or a phone number of the sender;<br />{smsText} - SMS context</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getFullSms</code></p>\n","type":"text/plain"},"key":"action","value":"getFullSms"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Operation ID (according to getNumber or getStatus responses)</p>\n","type":"text/plain"},"key":"id","value":"{{operationId}}"}],"variable":[]}},"response":[{"id":"12ed2450-74b7-4987-996f-2166254fdd6a","name":"getFullSms successful response","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getFullSms&api_key={{api_key}}&id={{operationId}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getFullSms","description":"Method name, in this case `getFullSms`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"id","value":"{{operationId}}","description":"Operation ID (according to getNumber or getStatus responses)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"FULL_SMS:[vk] 877613"}],"_postman_id":"a83bee68-f04e-465b-b23f-01c595a60d0b"},{"name":"setStatus","id":"a8c630cd-026b-482f-bb14-09ada48bda6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=setStatus&api_key={{api_key}}&id={{operationId}}&status={{statusCode}}","description":"<p>This request allows you to change the status of the operation according to its results (cancel operation, get next SMS code, close operation).</p>\n<p>You might want to use this request when you want explicitly change the status of the operation, for example when your application needs to retrieve information from the second message received by this number.</p>\n<blockquote>\n<p><strong>IMPORTANT NOTE!</strong><br />Closing the operation is irreversible process: once you close the operation, you won't be able to use or restore access to this number.</p>\n</blockquote>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>setStatus</code></p>\n","type":"text/plain"},"key":"action","value":"setStatus"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Operation ID (according to getNumber or getStatus responses)</p>\n","type":"text/plain"},"key":"id","value":"{{operationId}}"},{"description":{"content":"<p>Status code:</p>\n<p><code>1</code> - inform when the phone number is ready (SMS was sent to this number),</p>\n<p><code>3</code> - request digital code from the next message,</p>\n<p><code>6</code> - close the operation</p>\n","type":"text/plain"},"key":"status","value":"{{statusCode}}"}],"variable":[]}},"response":[{"id":"2b878990-cb19-4a85-91d5-1cb872ace8be","name":"Successfully closed operation response","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=setStatus&api_key={{api_key}}&id={{operationId}}&status={{statusCode}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"setStatus","description":"Method name, in this case `setStatus`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"id","value":"{{operationId}}","description":"Operation ID (according to getNumber or getStatus responses)"},{"key":"status","value":"{{statusCode}}","description":"Status code:\n            \n`1` - inform when the phone number is ready (SMS was sent to this number),\n            \n`3` - request digital code from the next message,\n            \n`6` - close the operation"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"ACCESS_ACTIVATION"},{"id":"3119d003-5c8e-4b77-8ea9-17e992893448","name":"Ready to receive new message response","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=setStatus&api_key={{api_key}}&id={{operationId}}&status={{statusCode}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"setStatus","description":"Method name, in this case `setStatus`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"id","value":"{{operationId}}","description":"Operation ID (according to getNumber or getStatus responses)"},{"key":"status","value":"{{statusCode}}","description":"Status code:\n            \n`1` - inform when the phone number is ready (SMS was sent to this number),\n            \n`3` - request digital code from the next message,\n            \n`6` - close the operation"}]}},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"ACCESS_RETRY_GET"}],"_postman_id":"a8c630cd-026b-482f-bb14-09ada48bda6b"}],"id":"5574ce04-afe3-4d20-b1d8-b81097060502","description":"<p>Contains requests to access single-service activations API.</p>\n<p>Allows you to order a number to receive an unlimited number of SMS from a single service within a short time window (15 minutes for most of the services).</p>\n<p>Please note that you cannot change the service during the operation. To receive SMS from different services, you will need to order new numbers with the appropriate parameters.</p>\n<h4 id=\"following-requests-are-available\">Following requests are available:</h4>\n<ul>\n<li><p><strong>getNumbersStatus</strong> - returns a list of available numbers by country and service;</p>\n</li>\n<li><p><strong>getNumber</strong> - orders a phone number of a specific country to receive SMS messages from a selected service;</p>\n</li>\n<li><p><strong>getStatus</strong> - returns a short code contained in SMS received by the specified number;</p>\n</li>\n<li><p><strong>getFullSms</strong> - returns a full context of received SMS of a given number;</p>\n</li>\n<li><p><strong>setStatus</strong> - changes status of the operation according to its results (cancelling or closing).</p>\n</li>\n</ul>\n","_postman_id":"5574ce04-afe3-4d20-b1d8-b81097060502"},{"name":"Rent","item":[{"name":"getRentServicesAndCountries","id":"abbb8d42-0426-46d5-a5b2-87b46eef07f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentServicesAndCountries&api_key={{api_key}}&country={{countryId}}","description":"<p>This request returns a list of countries available for rent with rent details.</p>\n<p>You might want to use it to check if the numbers of desired country are available for rent and if so, how many.</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getRentServicesAndCountries</code></p>\n","type":"text/plain"},"key":"action","value":"getRentServicesAndCountries"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Country ID, according to getCountries response</p>\n","type":"text/plain"},"key":"country","value":"{{countryId}}"}],"variable":[]}},"response":[{"id":"acfade15-dfef-4741-9b0e-8ccf56fa5a5d","name":"getRentServicesAndCountries","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentServicesAndCountries&api_key={{api_key}}&country={{countryId}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getRentServicesAndCountries","description":"Method name, in this case `getRentServicesAndCountries`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"country","value":"{{countryId}}","description":"Country ID, according to getCountries response"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\r\n  \"countries\":{ //{value} phone numbers available for rent for this {countryId}\r\n    \"0\": 0, //0 phone numbers available for rent for Russia\r\n    \"1\": 16, //16 phone numbers available for rent for Ukraine\r\n    \"2\": 78, //78 phone numbers available for rent for Kazakhstan, and so on...\r\n    \"3\": 56,\r\n    \"4\": 46,\r\n    \"5\": 1045,\r\n    \"6\": 1351,\r\n    \"7\": 187,\r\n    \"8\": 32,\r\n    \"9\": 49,\r\n    \"10\": 34,\r\n    \"11\": 2,\r\n    \"12\": 1057,\r\n    \"13\": 1061,\r\n    \"14\": 1358,\r\n    \"15\": 1039,\r\n    \"16\": 45\r\n  },\r\n  \"operators\": //List of mobile operators available in {countryId}\r\n  {\r\n    \"0\": \"any\"\r\n  },\r\n  \"services\":\r\n  {\r\n    \"full\":\r\n    {\r\n      \"quant\": 1864, //Amount of available numbers for Russia (with prolongation option available)\r\n      \"cost\": 1.5 //Prolongation cost for numbers of Russia (in USD)\r\n    }\r\n  }\r\n}"}],"_postman_id":"abbb8d42-0426-46d5-a5b2-87b46eef07f3"},{"name":"getRentNumber","id":"0eba8166-7c68-4f95-b4e6-1a6d2a041c77","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentNumber&api_key={{api_key}}&country={{countryId}}&time={{hours}}","description":"<p>This request allows you to order a phone number for rent.</p>\n<p>You might want to use this service when you need to receive SMS from multiple different sources (websites, applications, other mobile numbers) or when need to receive SMS from a single one on the same number, but over a longer time (for example over 7 days).</p>\n<blockquote>\n<p><strong>IMPORTANT NOTES!</strong><br />Phone number should be activated by receiving SMS within 20 minutes after the order, otherwise the operation will be closed and refunded automatically.<br />Please note that some services are prohibited for use (and SMS from these services are not available), you can find the list of such services on the front page or in <a href=\"https://onlinesim.io/documentation/offer\">Public offer</a>.</p>\n</blockquote>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getRentNumber</code></p>\n","type":"text/plain"},"key":"action","value":"getRentNumber"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Country ID, according to getCountries response</p>\n","type":"text/plain"},"key":"country","value":"{{countryId}}"},{"description":{"content":"<p>Expected rental period in hours, which will be converted into days with a rounding-up (e.g. 2h - 1 day, 25h - 2 days)</p>\n","type":"text/plain"},"key":"time","value":"{{hours}}"}],"variable":[]}},"response":[{"id":"0c27c0a1-27b4-45b7-a110-a2bdfbfc4d3a","name":"getRentNumber","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentNumber&api_key={{api_key}}&country={{countryId}}&time={{hours}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getRentNumber","description":"Method name, in this case `getRentNumber`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"country","value":"{{countryId}}","description":"Country ID, according to getCountries response"},{"key":"time","value":"{{hours}}","description":"Expected rental period in hours, which will be converted into days with a rounding-up (e.g. 2h - 1 day, 25h - 2 days)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"status\": \"success\", //Operation status\n    \"phone\": { //Virtual number object\n        \"id\": 22867858, //Operation ID\n        \"endDate\": \"2022-07-17T19:54:55+03:00\", //Rental expiration date and time\n        \"number\": \"9912530000\" //Mobile number without a country code\n    }\n}"}],"_postman_id":"0eba8166-7c68-4f95-b4e6-1a6d2a041c77"},{"name":"getRentList","id":"68c9b228-f5a8-4667-9829-5ba1488141b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentList&api_key={{api_key}}","description":"<p>This request returns a list of rental numbers with current rent for your profile, including unactivated numbers, if the activation period has not expired.</p>\n<p>You might want to use this request to retrieve a relevant information on all the active rental numbers you've ordered.</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getRentList</code></p>\n","type":"text/plain"},"key":"action","value":"getRentList"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"}],"variable":[]}},"response":[{"id":"d09046bf-cde2-4a23-ba30-16e200026280","name":"getRentList","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentList&api_key={{api_key}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getRentList","description":"Method name, in this case `getRentList`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"status\": \"success\", //Request execution status\n    \"values\": { //Array of active rental numbers data of the profile\n        \"0\": {   //Country object where field name is a {countryId}\n            \"id\": 22867858, //Operation ID\n            \"phone\": \"9912530000\" //Mobile number without a country code that was issued for rent\n        }\n    }\n}"}],"_postman_id":"68c9b228-f5a8-4667-9829-5ba1488141b2"},{"name":"getRentStatus","id":"5bfef23f-cb81-4b7c-9f13-85c8e2bdbcbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentStatus&api_key={{api_key}}&id={{operationId}}","description":"<p>This request returns a list of SMS received on a rental virtual number.</p>\n<p>You might want to use this request to check the received message on a specified rental number to process this data in your application.</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>getRentStatus</code></p>\n","type":"text/plain"},"key":"action","value":"getRentStatus"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Operation ID (assigned upon order, to see list of active operation, use getRentList request)</p>\n","type":"text/plain"},"key":"id","value":"{{operationId}}"}],"variable":[]}},"response":[{"id":"71c7397d-a5e8-41c0-8692-dc101c8f9331","name":"getRentStatus","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentStatus&api_key={{api_key}}&id={{operationId}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"getRentStatus","description":"Method name, in this case `getRentStatus`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"id","value":"{{operationId}}","description":"Operation ID (assigned upon order, to see list of active operation, use getRentList request)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\r\n  \"status\": \"success\", //Request execution status\r\n  \"quantity\": 1, //Total messages received by this number\r\n  \"values\": {\r\n    \"0\": { //Message ID starting with 0\r\n      \"phoneFrom\": \"+79089102030\", //Rental number that has received the message (international format with \"+\" sign)\r\n      \"text\": \"Your verification code is 070501\", //Context of the message\r\n      \"service\": \"twitter\", //Sender's name or its phone number\r\n      \"date\": \"2021-02-02T14:46:49+03:00\" //Date and time of receipt\r\n    }\r\n  }\r\n}"}],"_postman_id":"5bfef23f-cb81-4b7c-9f13-85c8e2bdbcbc"},{"name":"setRentStatus","id":"559a44dd-e0d8-4777-a717-c8548cadd74d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=setRentStatus&api_key={{api_key}}&id={{operationId}}&status={{statusCode}}","description":"<p>This request closes the rent on a specified phone number.</p>\n<blockquote>\n<p><strong>IMPORTANT NOTE!</strong><br />Closing the operation is irreversible process: once you close the operation, you won't be able to use or restore access to this rental number. </p>\n</blockquote>\n<p>You might want to use this request when you need to close the operation explicitly and do not plan to use the number further, for example when the data you wanted has been retrieved.</p>\n","urlObject":{"protocol":"http","path":["stubs","handler_api.php"],"host":["api-conserver","onlinesim","io"],"query":[{"description":{"content":"<p>Method name, in this case <code>setRentStatus</code></p>\n","type":"text/plain"},"key":"action","value":"setRentStatus"},{"description":{"content":"<p>API key needed for request authorizarion</p>\n","type":"text/plain"},"key":"api_key","value":"{{api_key}}"},{"description":{"content":"<p>Operation ID (assigned upon order, to see list of active operation, use getRentList request)</p>\n","type":"text/plain"},"key":"id","value":"{{operationId}}"},{"description":{"content":"<p>Operation status code (constant value, can only accept <code>2</code>, else throws an error)</p>\n","type":"text/plain"},"key":"status","value":"{{statusCode}}"}],"variable":[]}},"response":[{"id":"f4d1c4e9-8ccf-42bb-9189-768446ed2a52","name":"setRentStatus","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://api-conserver.onlinesim.io/stubs/handler_api.php?action=setRentStatus&api_key={{api_key}}&id={{operationId}}&status={{statusCode}}","protocol":"http","host":["api-conserver","onlinesim","io"],"path":["stubs","handler_api.php"],"query":[{"key":"action","value":"setRentStatus","description":"Method name, in this case `setRentStatus`"},{"key":"api_key","value":"{{api_key}}","description":"API key needed for request authorizarion"},{"key":"id","value":"{{operationId}}","description":"Operation ID (assigned upon order, to see list of active operation, use getRentList request)"},{"key":"status","value":"{{statusCode}}","description":"Operation status code (constant value, can only accept `2`, else throws an error)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\r\n  \"status\": \"success\" //Request execution status\r\n}"}],"_postman_id":"559a44dd-e0d8-4777-a717-c8548cadd74d"}],"id":"3be51897-8fa0-4731-8aba-a46c39e5df25","description":"<p>Contains requests to access long term rental API.</p>\n<p>This service implies that the number will be used to receive SMS from multiple different senders (including SMS from other mobile numbers), except for those that are prohibited.</p>\n<h4 id=\"following-requests-are-available\">Following requests are available:</h4>\n<ul>\n<li><p><strong>getRentServicesAndCountries</strong> - returns a list of countries available for long-term rental with detailed information;</p>\n</li>\n<li><p><strong>getRentNumber</strong> - rents a virtual phone number for rent;</p>\n</li>\n<li><p><strong>getRentList</strong> - returns a list of rental numbers with current rent for your profile, including unactivated numbers, if the activation period has not expired;</p>\n</li>\n<li><p><strong>getRentStatus</strong> - returns a list of SMS received on a rental virtual number;</p>\n</li>\n<li><p><strong>setRentStatus</strong> - closes the rent on a specified phone number.</p>\n</li>\n</ul>\n","_postman_id":"3be51897-8fa0-4731-8aba-a46c39e5df25"}]}