API Overview - VoIP.ms Wiki

Check out our YouTube channel to watch our simple tutorials that will help you set up most of our features.

API Overview

From VoIP.ms Wiki

(Difference between revisions)
Jump to: navigation, search
[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. It must be enabled manually in the customer portal before use, and access is restricted to whitelisted IP addresses.
+
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;" |
-
 
-
The REST/JSON API accepts both GET and POST requests.
 
'''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 — any other value is an error code documented in the portal.
+
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 carrier regulations, A2P messaging requires a separate verification process before use.
+
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] — requires login
+
* '''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]
-
* '''Back to Basics — REST APIs:''' [https://wiki.voip.ms/article/Back-to-Basics:_What_Is_Communication_REST_API%3F What Is a Communication REST API?]
+
|}
-
== Support scope ==
+
= Support scope =
-
VoIP.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.
+
{| 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: [mailto:[email protected] [email protected]]
+
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]]
-
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.
 
|}
|}
[[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:


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. 192.168.1.0/24), wildcards (e.g. 192.168.1.*), or DNS hostnames.


Not sure what IP to whitelist? Call the getIP method — it is the only method that bypasses IP authentication and returns the IP address seen by the API.

Authentication

Every API request requires two parameters:

  • api_username — the email address used to log in to your VoIP.ms account
  • api_password — 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.

Making a Request

REST endpoint:

https://voip.ms/api/v1/rest.php

Required parameters for every request:

  • api_username — your account email
  • api_password — your API password
  • method — the name of the function to call

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 application/json, append &content_type=json to your request.

All responses include a status field. A value of success indicates the request completed without errors.

Example: GET request

Retrieve 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 status field. Check for success before using the returned data. Any other value is an error code documented in the portal.

SOAP

SOAP 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.

Category What you can do
General Retrieve account balance, server list, transaction history, conference data, and sequences
Accounts Create, update, and delete subaccounts; manage codecs, protocols, music on hold, registration status, and voicemail transcriptions
DIDs Search, order, configure, and cancel phone numbers (US, Canada, international, toll-free, virtual); manage routing, POP, IVRs, ring groups, queues, time conditions, forwarding, callbacks, SIP URIs, phonebook, and SMS/MMS
Call Detail Records Retrieve CDR with filters by date, type, account, and billing; look up termination rates
Call Recordings List, retrieve, email, and delete call recordings
Call Parking Create and manage call parking slots
Fax Order and manage fax numbers, send faxes, retrieve messages, manage folders and email-to-fax configurations
e911 Provision, update, validate, and cancel e911 service on DIDs
Local Number Portability (LNP) Submit porting requests, upload supporting documents, and check port status
Clients (Reseller) Create and manage reseller client accounts, packages, charges, deposits, and balance thresholds

SMS & Messaging

⚠️ SMS / A2P requirements

VoIP.ms supports Application-to-Person (A2P) delivery for business text messaging via the API (sendSMS, sendMMS). 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.

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]

Personal tools
Namespaces
Variants
Actions
VoIP.ms Wiki
Guides 🇨🇦
Guías 🇲🇽