Home API Hub

Developer Hub

Powerful Telephony API
for Developers & AI Systems

Provision virtual numbers in 145 countries, send and receive SMS, control calls, and connect AI voice agents — all via a simple REST API. No hardware. Instant activation.

Everything You Need to Build on Top of Voice & SMS

Four API surface areas — one account, one token, one REST interface.

📡

Number Provisioning API

Search, order, and release virtual phone numbers in 145 countries programmatically. No dashboard required.

💬

SMS API

Send outbound SMS and receive inbound messages via webhook on any SMS-enabled local number.

📞

Call Control API

Set call forwarding destinations dynamically — to an extension, PSTN number, SIP trunk, or IP address.

🔔

Webhook Events

Receive real-time HTTP callbacks for incoming calls and SMS. Ideal for AI voice agents and automations.

Quick-Start Code Samples

All API calls use POST. First call Login to get your account_token, then pass it in every subsequent request.
Full endpoint reference: Postman API Sandbox

# Step 1 — Login and get your account_token
import requests

login = requests.post("https://newsip.pbxme.com/api/login", data={
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD"
})
token = login.json()["account_token"]

# Step 2 — List available DIDs in Israel
available = requests.post("https://newsip.pbxme.com/api/did/available", data={
    "token": token,
    "country": "IL"
})
dids = available.json()
for d in dids["dids"][:3]:
    print(d["did_number"], d["monthly_cost"])

# Step 3 — Assign a DID to your account
order = requests.post("https://newsip.pbxme.com/api/did/assign", data={
    "token": token,
    "did_id": dids["dids"][0]["did_id"]
})
print("Provisioned:", order.json())

# Step 4 — Set forwarding destination
fwd = requests.post("https://newsip.pbxme.com/api/did/forward", data={
    "token": token,
    "did_id": dids["dids"][0]["did_id"],
    "destination": "+19175550100"   # or SIP: user@domain
})
print("Forwarding set:", fwd.json())

// Requires: npm install node-fetch form-data
const fetch = require("node-fetch");
const FormData = require("form-data");

// Step 1 — Login
async function pbxmeLogin(username, password) {
  const form = new FormData();
  form.append("username", username);
  form.append("password", password);

  const res = await fetch("https://newsip.pbxme.com/api/login", {
    method: "POST", body: form
  });
  const data = await res.json();
  return data.account_token;
}

// Step 2 — Get available numbers
async function getAvailableDIDs(token, country = "US") {
  const form = new FormData();
  form.append("token", token);
  form.append("country", country);

  const res = await fetch("https://newsip.pbxme.com/api/did/available", {
    method: "POST", body: form
  });
  return res.json();
}

// Step 3 — Run it
(async () => {
  const token = await pbxmeLogin("YOUR_USERNAME", "YOUR_PASSWORD");
  const numbers = await getAvailableDIDs(token, "GB");
  console.log("Available UK numbers:", numbers.dids.slice(0,3));
})();

# Step 1 — Login and capture token
TOKEN=$(curl -s -X POST https://newsip.pbxme.com/api/login \
  -d "username=YOUR_USERNAME" \
  -d "password=YOUR_PASSWORD" \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['account_token'])")

# Step 2 — Check account balance
curl -s -X POST https://newsip.pbxme.com/api/balance \
  -d "token=$TOKEN"
# Step 3 — List available numbers in Germany
curl -s -X POST https://newsip.pbxme.com/api/did/available \
  -d "token=$TOKEN" \
  -d "country=DE"
# Step 4 — Release a DID
curl -s -X POST https://newsip.pbxme.com/api/did/release \
  -d "token=$TOKEN" \
  -d "did_id=12345"

What Developers Build with PBXme API

Explore detailed guides for each integration use case.

🤖

AI Agent Integration

Give your AI voice agent or LLM a real local phone number. Provision via API, route calls to your AI system via webhook.

See integration guide → 🔢

DID Number Provisioning

Programmatically search, order, configure, and release virtual numbers across 145 countries — no dashboard, no manual steps.

See provisioning guide → ✉️

SMS via API

Send outbound SMS and receive inbound SMS via webhook. Works with local SMS-enabled numbers in supported countries.

See SMS guide →

Webhooks & Events

Real-time HTTP callbacks for call and SMS events. Build automations, trigger flows, and integrate with any backend.

See webhook guide →

Frequently Asked Questions

Common questions from developers integrating PBXme API.

Yes. PBXme provides a REST API for programmatic provisioning of virtual phone numbers in 145 countries. You can search available numbers, assign them to your account, configure forwarding, and release them — all without logging into the dashboard.

Yes. PBXme’s API supports dynamic call forwarding and webhook callbacks, making it suitable for routing inbound calls to AI voice agent platforms such as Bland.ai, Vapi, and Retell. You provision a local number via API, then point its destination to your AI system’s SIP URI or webhook URL.

The PBXme API is a standard HTTP POST REST API. Any language that can send HTTP requests works: Python, Node.js, PHP, Ruby, Go, Java, and so on. Code samples are provided for Python, Node.js, and cURL on this page.

Yes. The full API reference and a free sandbox environment are available at pbxme.com/api-documentation-sandbox. You can also explore the interactive Postman collection without writing any code.

All requests use POST. First, call the Login endpoint with your username and password to receive an account_token. Include this token as a POST parameter in every subsequent API call.

Ready to Start Building?

Create a free account and get your API token in under 2 minutes.

🚀 Sign Up Free 📄 Read API Docs

    Sales, click to chat