Powerful Telephony API for Developers & AI Systems
Provision virtual numbers, configure inbound call routing, send SMS through our network, and manage inbound SMS forwarding. The core account/DID API uses documented POST calls, while SMS sending uses a separate HTTP GET API.
Everything You Need to Build on Top of Voice & SMS
Postman-documented account, CDR, DID, and SMS configuration APIs, plus a separate outbound SMS GET API.
Number Provisioning APISearch available DIDs, assign a DID to your account, list purchased DIDs, release DIDs, and configure their forwarding destination programmatically. | SMS APISend outbound SMS through our network using a separate HTTP GET API. Configure inbound SMS forwarding to another SMS number, email address, or webhook URL through the API. |
DID Routing APIConfigure forwarding for purchased DIDs. The documented forwarding call supports a | Account & Usage APIAuthenticate through the Login call, retrieve account charge history, and request CDR reports for a selected date range. CDR reports are delivered to the account registered email address as an Excel file inside a ZIP attachment. Authentication values returned by Login are reused in later requests. |
SMS-to-Webhook Routing NEWRoute inbound SMS to your own HTTP endpoint. SMS-to-webhook is fully operational and can be configured programmatically through |
SMS Sending & Webhook Routing
1. Send SMS via HTTP API: outbound SMS can be sent through the PBXMe network using a separate HTTP GET endpoint that is currently not part of the Postman collection. This capability is documented as part of the user’s SMS portal. For security, the source IP must first be allowed under My Account → IP Settings.
Request: https://api.israelnumber.com/astppsend-sms?username={username}&password={password}&destination={destination}&callerid={CallerID}&message={message_body}&sms=1&whatsapp=0
2. SMS-to-Webhook: inbound SMS can be forwarded to your HTTP endpoint and the destination can be configured programmatically through /api/sms using the webhook_url field. The same setting is also available in the account portal under Forward Type → API.
Webhook URL template: https://example.com/api?from={CallerID}&text={SMS_TEXT}&to={SMS_DST_ADDR}
Authentication & Request Format
Before using the API, the source IP address of the server sending requests must be whitelisted in the user’s account portal. Each account also has its own unique username and password, which are sent in the initial Login request.
The supplied Postman reference documents POST requests with JSON request bodies and an x-auth-token request header. For the initial Login call, use the fixed x-auth-token value provided in the Postman documentation together with the account username and password. A successful Login returns the account id, account_token, and a newly generated session x-auth-token. Use that generated session x-auth-token in the request header for all subsequent API calls in the same session, while the returned account id and account_token are sent in the request body as the documented id and token values.
Important: the separate outbound SMS GET API also requires the sending server IP to be allowlisted and uses the account username/password rather than the Login/session-token flow.
Quick-Start Code Samples
Whitelist the sending server IP first. Use the fixed x-auth-token from the Postman documentation only for the initial Login request together with your account username/password. Login returns the account id, account_token, and a generated session x-auth-token. Use the session x-auth-token in the header of subsequent calls, and use the returned id and account_token in request bodies as required by each endpoint.
# Based on the supplied API reference.
# Whitelist your server IP first. Use the fixed x-auth-token from the Postman docs for Login.
import requests
INITIAL_HEADERS = {
"x-auth-token": "YOUR_INITIAL_X_AUTH_TOKEN",
"Content-Type": "application/json"
}
# Step 1 — Login with the fixed initial x-auth-token
login = requests.post(
"https://newsip.israelnumber.com/api/login/",
headers=INITIAL_HEADERS,
json={
"username": "YOUR_ACCOUNT_NUMBER",
"password": "YOUR_PASSWORD"
}
)
login.raise_for_status()
login_data = login.json()
account_id = login_data["id"]
token = login_data["account_token"]
session_x_auth_token = login_data["x-auth-token"]
# Use the generated session x-auth-token after Login
SESSION_HEADERS = {
"x-auth-token": session_x_auth_token,
"Content-Type": "application/json"
}
# Step 2 — List available DIDs
# country_id is the optional numeric country ID provided in the Country List reference.
available = requests.post(
"https://newsip.israelnumber.com/customer/did_crud/",
headers=SESSION_HEADERS,
json={
"action": "available_list",
"parent_id": "0",
"country_id": "YOUR_COUNTRY_ID",
"id": account_id,
"token": token
}
)
available_data = available.json()
# Step 3 — Assign a DID
# did_id comes from the DID Available List response.
order = requests.post(
"https://newsip.israelnumber.com/customer/did_management/",
headers=SESSION_HEADERS,
json={
"action": "assign",
"did_id": "YOUR_DID_ID",
"accountid": account_id,
"reseller_id": "0",
"id": account_id,
"token": token
}
)
print(order.json())
# Step 4 — Set DID forwarding
# Reference example: call_type=2, call_type_value=your trunk IP.
forwarding = requests.post(
"https://newsip.israelnumber.com/customer/did_management/",
headers=SESSION_HEADERS,
json={
"action": "forward",
"did_id": "YOUR_PURCHASED_DID_ID",
"call_type": "2",
"call_type_value": "YOUR_TRUNK_IP",
"always": "5",
"user_busy": "5",
"user_not_registered": "5",
"no_answer": "5",
"extensions": "",
"call_type_vm_flag": "",
"always_destination": "",
"always_vm_flag": "",
"user_busy_destination": "",
"user_busy_vm_flag": "",
"user_not_registered_destination": "",
"user_not_registered_vm_flag": "",
"no_answer_destination": "",
"no_answer_vm_flag": "",
"id": account_id,
"token": token
}
)
print(forwarding.json())
# Step 5 — Configure inbound SMS forwarding to a webhook
sms_webhook = requests.post(
"https://newsip.israelnumber.com/api/sms",
headers=SESSION_HEADERS,
json={
"action": "add",
"id": account_id,
"token": token,
"did": "YOUR_SMS_ENABLED_DID",
"webhook_url": "https://example.com/api?from={CallerID}&text={SMS_TEXT}&to={SMS_DST_ADDR}"
}
)
print("SMS webhook status:", sms_webhook.status_code)
if sms_webhook.content:
try:
print("SMS webhook response:", sms_webhook.json())
except ValueError:
print("SMS webhook response:", sms_webhook.text)// Node.js 18+ (native fetch)
// Based on the supplied API reference.
const INITIAL_HEADERS = {
"x-auth-token": "YOUR_INITIAL_X_AUTH_TOKEN",
"Content-Type": "application/json"
};
async function post(url, body, headers) {
const res = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body)
});
return res.json();
}
async function login(username, password) {
return post(
"https://newsip.israelnumber.com/api/login/",
{ username, password },
INITIAL_HEADERS
);
}
async function getAvailableDIDs(id, token, countryId, headers) {
return post("https://newsip.israelnumber.com/customer/did_crud/", {
action: "available_list",
parent_id: "0",
country_id: countryId,
id,
token
}, headers);
}
async function getPurchasedDIDs(id, token, headers) {
return post("https://newsip.israelnumber.com/customer/did_crud/", {
action: "purchase_list",
id,
token
}, headers);
}
async function addSmsWebhook(id, token, did, webhookUrl, headers) {
const res = await fetch("https://newsip.israelnumber.com/api/sms", {
method: "POST",
headers,
body: JSON.stringify({
action: "add",
id,
token,
did,
webhook_url: webhookUrl
})
});
const text = await res.text();
let response = text;
if (text) {
try { response = JSON.parse(text); } catch (e) {}
}
return { status: res.status, response };
}
(async () => {
const auth = await login("YOUR_ACCOUNT_NUMBER", "YOUR_PASSWORD");
const accountId = auth.id;
const token = auth.account_token;
const sessionXAuthToken = auth["x-auth-token"];
const SESSION_HEADERS = {
"x-auth-token": sessionXAuthToken,
"Content-Type": "application/json"
};
// countryId is the optional numeric country ID provided in the Country List reference.
const available = await getAvailableDIDs(
accountId,
token,
"YOUR_COUNTRY_ID",
SESSION_HEADERS
);
console.log(available);
const purchased = await getPurchasedDIDs(accountId, token, SESSION_HEADERS);
console.log(purchased);
const smsWebhook = await addSmsWebhook(
accountId,
token,
"YOUR_SMS_ENABLED_DID",
"https://example.com/api?from={CallerID}&text={SMS_TEXT}&to={SMS_DST_ADDR}",
SESSION_HEADERS
);
console.log("SMS webhook result:", smsWebhook);
})();# Step 1 — Login with the fixed initial x-auth-token
LOGIN_RESPONSE=$(curl -s -X POST "https://newsip.israelnumber.com/api/login/" \
-H "x-auth-token: YOUR_INITIAL_X_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username":"YOUR_ACCOUNT_NUMBER",
"password":"YOUR_PASSWORD"
}')
# Extract values returned by Login.
# Requires jq: https://jqlang.org/
ACCOUNT_ID=$(printf '%s' "$LOGIN_RESPONSE" | jq -r '.id')
ACCOUNT_TOKEN=$(printf '%s' "$LOGIN_RESPONSE" | jq -r '.account_token')
SESSION_X_AUTH_TOKEN=$(printf '%s' "$LOGIN_RESPONSE" | jq -r '."x-auth-token"')
# Step 2 — List available DIDs using the generated session x-auth-token
curl -s -X POST "https://newsip.israelnumber.com/customer/did_crud/" \
-H "x-auth-token: $SESSION_X_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"action\":\"available_list\",
\"parent_id\":\"0\",
\"country_id\":\"YOUR_COUNTRY_ID\",
\"id\":\"$ACCOUNT_ID\",
\"token\":\"$ACCOUNT_TOKEN\"
}"
# Step 3 — List purchased DIDs
curl -s -X POST "https://newsip.israelnumber.com/customer/did_crud/" \
-H "x-auth-token: $SESSION_X_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"action\":\"purchase_list\",
\"id\":\"$ACCOUNT_ID\",
\"token\":\"$ACCOUNT_TOKEN\"
}"
# Step 4 — Release a DID
curl -s -X POST "https://newsip.israelnumber.com/customer/did_management/" \
-H "x-auth-token: $SESSION_X_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"action\":\"release\",
\"did_id\":\"YOUR_DID_ID\",
\"accountid\":\"$ACCOUNT_ID\",
\"id\":\"$ACCOUNT_ID\",
\"token\":\"$ACCOUNT_TOKEN\"
}"
# Step 5 — Configure inbound SMS forwarding to a webhook
# -i shows HTTP status/headers together with any response body.
curl -s -i -X POST "https://newsip.israelnumber.com/api/sms" \
-H "x-auth-token: $SESSION_X_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"action\":\"add\",
\"id\":\"$ACCOUNT_ID\",
\"token\":\"$ACCOUNT_TOKEN\",
\"did\":\"YOUR_SMS_ENABLED_DID\",
\"webhook_url\":\"https://example.com/api?from={CallerID}&text={SMS_TEXT}&to={SMS_DST_ADDR}\"
}"Full endpoint reference: API Directory · Full Postman collection
SMS API Examples
Outbound SMS uses the separate operational GET API. Inbound SMS-to-webhook configuration is supported by the documented /api/sms POST API.
Send SMS — HTTP GET APISend a message without opening the account portal. This capability is documented as part of the user’s SMS portal. Allowlist the sending server IP first under My Account → IP Settings. Endpoint: Parameters: Example: | Inbound SMS → WebhookFully operational. Configure the webhook programmatically with Endpoint: Required API values: For webhook-only SMS forwarding, Webhook template variables: Example request body: |
What Developers Build with PBXMe API
Explore detailed guides for each integration use case.
AI Agent IntegrationProvision a local DID through the API and route inbound calls using the documented DID forwarding configuration. | DID Number ProvisioningProgrammatically search available DIDs, assign them, configure forwarding, list purchased DIDs, and release them. |
SMS via APISend outbound SMS using the separate HTTP GET API, and configure inbound SMS forwarding to another SMS number, email address, or webhook URL through the documented SMS configuration calls. | SMS-to-WebhookForward incoming SMS to your own HTTP endpoint. Configure the destination programmatically through |
API Directory — Full ReferenceTechnical reference for the Postman-documented Login, account, CDR export, DID, forwarding, and SMS configuration calls. The separate outbound SMS GET API is described on this Hub. |
Frequently Asked Questions
Common questions from developers integrating the PBXMe API.
Can I provision virtual phone numbers via API?
Yes. The documented API supports listing available DIDs, assigning a DID to your account, listing purchased DIDs, configuring forwarding, and releasing a DID programmatically.
Is there a telephony API for AI voice agents?
The documented API supports programmatic DID provisioning and forwarding configuration. This can be used as part of an AI voice integration when the AI platform can receive calls through a compatible telephony destination. SMS-to-webhook is a separate inbound SMS feature and should not be confused with live voice-media delivery.
What programming languages does the PBXMe API support?
The documented interface uses HTTP POST requests with JSON bodies and an x-auth-token header. Any language that can make HTTP requests can integrate with it; examples are shown here in Python, Node.js, and cURL.
Is there a free sandbox to test the API?
The full API reference is available on Postman, and general documentation is available at pbxme.com/api-documentation-sandbox. Use the credentials and testing environment provided for your account. Do not assume that production resources can be provisioned without charge.
How do I authenticate API requests?
First whitelist the source IP address of the server making the API calls in your account portal. The initial Login request uses your account-specific username/password together with the fixed x-auth-token published in the Postman documentation. After Login succeeds, the response returns your account id, account_token, and a generated session x-auth-token. Use that session x-auth-token in the request header for all subsequent calls in the same API session, while the returned id and account_token are sent in the request body as the documented id and token values.
How do I select a country when listing available numbers?
Use the optional numeric country_id provided in the Country List reference/example. The current API reference marks the Country List call as disabled and provides the country IDs in the example rather than requiring the call to be executed.
Can I send outbound SMS through the API?
Yes. PBXMe provides a separate HTTP GET endpoint for outbound messaging: https://api.israelnumber.com/astppsend-sms. It accepts username, password, destination, callerid, message, sms, and whatsapp parameters. Your source IP must be configured in My Account → IP Settings. This endpoint is documented as part of the user’s SMS portal and is not currently included in the Postman collection.
Can incoming SMS be forwarded to my webhook?
Yes. Inbound SMS webhook routing is fully operational and can be configured programmatically through /api/sms using the webhook_url field. You can also configure the same destination in the account portal under Forward Type → API. The webhook URL can use {CallerID}, {SMS_TEXT}, and {SMS_DST_ADDR}; the platform replaces those placeholders with live values for each incoming message.
Ready to Start Building?
Create an account and use the documented Login flow to obtain your account authentication values.
