API Overview
From VoIP.ms Wiki
|
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 API is available to all VoIP.ms customers. It 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. |
Contents |
Getting Started
|
Before making any API calls, complete these three steps in the customer portal: 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. 2. Enable API access 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 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. Not sure what IP to whitelist? Call the |
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
|
The REST/JSON API accepts both GET and POST requests. 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. Response format: 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 scopeVoIP.ms does not provide support for your programming language or integration code. API support covers bugs, documentation errors, and questions about the functionality of specific methods. Submit these via the ticketing system — the API team does not have access to Live Chat. For general API questions: [email protected] The VoIP.ms API is actively used in production by resellers, MSPs, and developers automating provisioning workflows. Improved developer documentation — including a full public API reference — is in progress. |