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]
Drouleau (Talk | contribs)
(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:...")
Newer edit →

Revision as of 20:52, 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 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. 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

The REST/JSON API accepts both GET and POST requests.

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 carrier 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

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.

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.

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