API Overview
From VoIP.ms Wiki
| [checked revision] | [checked revision] |
(Created page with "{| cellspacing="0" style="width: 100%; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border: 1px solid #e2e8f0; border-radius: 8px; padding: 35px; margin-bottom:...") |
|||
| Line 14: | Line 14: | ||
|- | |- | ||
| style="text-align: left;" | | | style="text-align: left;" | | ||
| - | <div style="font-size: 1.1em; font-weight: 500; color: #b91c1c; margin-bottom: 15px;">What is the VoIP.ms API?</div> | + | <div style="font-size: 1.1em; font-weight: 500; color: #b91c1c; margin-bottom: 15px;">'''What is the VoIP.ms API?'''</div> |
| - | The VoIP.ms API lets you programmatically manage your account, phone numbers, subaccounts, call routing, SMS, fax, and more. It supports both '''REST/JSON''' and '''SOAP''' interfaces, with over 100 methods across all major platform features. | + | The VoIP.ms API lets you programmatically manage your account, phone numbers, subaccounts, call routing, SMS, fax, and more. It supports both '''REST/JSON''' and '''SOAP''' interfaces, with over 100 methods across all major platform features. The VoIP.ms API is actively used in production by resellers, MSPs, and developers automating workflows. Improved developer documentation including a full public API reference is in progress. |
| - | The API is available to all VoIP.ms customers | + | The API is available to all VoIP.ms customers, but must be enabled manually in the customer portal before use, and access is restricted to whitelisted IP addresses. |
'''Full method reference:''' Available in the [https://www.voip.ms/m/api.php customer portal] under Main Menu → SOAP & REST/JSON API. | '''Full method reference:''' Available in the [https://www.voip.ms/m/api.php customer portal] under Main Menu → SOAP & REST/JSON API. | ||
| + | |||
| + | '''Learn More:''' [https://wiki.voip.ms/article/Back-to-Basics:_What_Is_Communication_REST_API%3F What Is a Communication REST API?] | ||
| + | |||
|} | |} | ||
| Line 32: | Line 35: | ||
Before making any API calls, complete these three steps in the [https://www.voip.ms/m/api.php customer portal]: | Before making any API calls, complete these three steps in the [https://www.voip.ms/m/api.php customer portal]: | ||
| + | |||
'''1. Set an API password''' | '''1. Set an API password''' | ||
Go to '''Main Menu → SOAP & REST/JSON API''', enter a password dedicated to API access, and click '''Save API Password'''. This password is separate from your portal login password. | Go to '''Main Menu → SOAP & REST/JSON API''', enter a password dedicated to API access, and click '''Save API Password'''. This password is separate from your portal login password. | ||
| + | |||
'''2. Enable API access''' | '''2. Enable API access''' | ||
On the same page, click '''Enable/Disable API''' to activate API access for your account. It is disabled by default. | On the same page, click '''Enable/Disable API''' to activate API access for your account. It is disabled by default. | ||
| + | |||
'''3. Whitelist your IP address''' | '''3. Whitelist your IP address''' | ||
| Line 47: | Line 53: | ||
You can add multiple IPs separated by commas, use CIDR ranges (e.g. <code>192.168.1.0/24</code>), wildcards (e.g. <code>192.168.1.*</code>), or DNS hostnames. | You can add multiple IPs separated by commas, use CIDR ranges (e.g. <code>192.168.1.0/24</code>), wildcards (e.g. <code>192.168.1.*</code>), or DNS hostnames. | ||
| - | Not sure what IP to whitelist? Call the <code>getIP</code> method — it is the only method that bypasses IP authentication and returns the IP address seen by the API. | + | |
| + | '''Not sure what IP to whitelist?''' Call the <code>getIP</code> method — it is the only method that bypasses IP authentication and returns the IP address seen by the API. | ||
|} | |} | ||
| Line 61: | Line 68: | ||
* <code>api_password</code> — the API-specific password set in the portal (not your portal login password) | * <code>api_password</code> — the API-specific password set in the portal (not your portal login password) | ||
| - | Requests must also originate from a whitelisted IP address. Both conditions must be met for a request to succeed. | + | Requests must also originate from a whitelisted IP address. '''Both conditions must be met for a request to succeed.''' |
|} | |} | ||
| Line 69: | Line 76: | ||
|- | |- | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
| - | |||
| - | |||
'''REST endpoint:''' | '''REST endpoint:''' | ||
| Line 81: | Line 86: | ||
Additional parameters vary by method and are documented in the portal. | Additional parameters vary by method and are documented in the portal. | ||
| + | |||
'''Response format:''' | '''Response format:''' | ||
| Line 122: | Line 128: | ||
</pre> | </pre> | ||
| - | All responses include a <code>status</code> field. Check for <code>success</code> before using the returned data | + | All responses include a <code>status</code> field. Check for <code>success</code> before using the returned data. Any other value is an error code documented in the portal. |
== SOAP == | == SOAP == | ||
| Line 181: | Line 187: | ||
<div style="font-weight: 600; color: #92400e; margin-bottom: 8px;">⚠️ SMS / A2P requirements</div> | <div style="font-weight: 600; color: #92400e; margin-bottom: 8px;">⚠️ SMS / A2P requirements</div> | ||
| - | VoIP.ms supports Application-to-Person (A2P) delivery for business text messaging via the API (<code>sendSMS</code>, <code>sendMMS</code>). However, due to | + | VoIP.ms supports Application-to-Person (A2P) delivery for business text messaging via the API (<code>sendSMS</code>, <code>sendMMS</code>). However, due to regulations, A2P messaging requires a separate verification process before use. |
The default limit is 100 SMS per day. This can be raised upon request after verification. | The default limit is 100 SMS per day. This can be raised upon request after verification. | ||
| Line 194: | Line 200: | ||
| style="vertical-align: top;" | | | style="vertical-align: top;" | | ||
| - | * '''Full method reference''' (parameters, response fields, error codes): [https://www.voip.ms/m/api.php Main Menu → SOAP & REST/JSON API] | + | * '''Full method reference''' (parameters, response fields, error codes): [https://www.voip.ms/m/api.php Main Menu → SOAP & REST/JSON API] |
* '''Download example code''' (REST/PHP, SOAP/PHP4, SOAP/PHP5, SOAP/.NET): [https://voip.ms/api/v1/API.zip voip.ms/api/v1/API.zip] | * '''Download example code''' (REST/PHP, SOAP/PHP4, SOAP/PHP5, SOAP/.NET): [https://voip.ms/api/v1/API.zip voip.ms/api/v1/API.zip] | ||
* '''WSDL for SOAP:''' [https://voip.ms/api/v1/server.wsdl voip.ms/api/v1/server.wsdl] | * '''WSDL for SOAP:''' [https://voip.ms/api/v1/server.wsdl voip.ms/api/v1/server.wsdl] | ||
| - | + | |} | |
| - | + | = Support scope = | |
| - | + | {| cellspacing="0" style="width: 100%; background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; margin: 20px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.06);" | |
| + | |- | ||
| + | | style="vertical-align: top;" | | ||
| - | + | For general API questions, bugs, documentation errors, and questions about the functionality of specific methods, please submit these via the ticketing system as the API team does not have access to Live Chat or send us an email at [mailto:[email protected] [email protected]] | |
| - | |||
|} | |} | ||
[[Category:API]] | [[Category:API]] | ||
Revision as of 21:02, 5 March 2026
|
API Overview
Integrate VoIP.ms into your application, platform, or workflow using the VoIP.ms REST/JSON API. |
|
What is the VoIP.ms API?
The VoIP.ms API lets you programmatically manage your account, phone numbers, subaccounts, call routing, SMS, fax, and more. It supports both REST/JSON and SOAP interfaces, with over 100 methods across all major platform features. The VoIP.ms API is actively used in production by resellers, MSPs, and developers automating workflows. Improved developer documentation including a full public API reference is in progress. The API is available to all VoIP.ms customers, but must be enabled manually in the customer portal before use, and access is restricted to whitelisted IP addresses. Full method reference: Available in the customer portal under Main Menu → SOAP & REST/JSON API. Learn More: What Is a Communication REST API? |
Contents |
Getting Started
|
Before making any API calls, complete these three steps in the customer portal:
Go to Main Menu → SOAP & REST/JSON API, enter a password dedicated to API access, and click Save API Password. This password is separate from your portal login password.
On the same page, click Enable/Disable API to activate API access for your account. It is disabled by default.
Enter the IP address of the server or machine that will be making API requests, then click Save IP Addresses. No requests are accepted from non-whitelisted IPs. You can add multiple IPs separated by commas, use CIDR ranges (e.g.
|
Authentication
|
Every API request requires two parameters:
Requests must also originate from a whitelisted IP address. Both conditions must be met for a request to succeed. |
Making a Request
|
REST endpoint: https://voip.ms/api/v1/rest.php Required parameters for every request:
Additional parameters vary by method and are documented in the portal.
Responses are returned as JSON by default (Content-Type: text/html). To receive All responses include a Example: GET requestRetrieve all DIDs on your account: https://voip.ms/api/v1/[email protected]&api_password=your_api_password&method=getDIDsInfo Example: PHP / cURL with response handling<?php $user = '[email protected]'; $pass = 'your_api_password'; $method = 'getRegistrationStatus'; $account = '100000_device'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, "https://voip.ms/api/v1/rest.php?api_username={$user}&api_password={$pass}&method={$method}&account={$account}" ); $result = curl_exec($ch); curl_close($ch); $response = json_decode($result, true); if ($response['status'] !== 'success') { echo 'Error: ' . $response['status']; exit; } echo $account . ' registered: ' . $response['registered']; ?> All responses include a SOAPSOAP is also supported via the WSDL at voip.ms/api/v1/server.wsdl. PHP4, PHP5, and .NET example files are included in the downloadable example package (see Resources below). |
Available Method Categories
|
The API has over 100 methods organized into the following categories. The full list with parameters, response fields, and error codes is available in the customer portal. |
SMS & Messaging
|
⚠️ SMS / A2P requirements
VoIP.ms supports Application-to-Person (A2P) delivery for business text messaging via the API ( The default limit is 100 SMS per day. This can be raised upon request after verification. To start the A2P verification process, contact: [email protected] |
Resources
|
Support scope
|
For general API questions, bugs, documentation errors, and questions about the functionality of specific methods, please submit these via the ticketing system as the API team does not have access to Live Chat or send us an email at [email protected] |