DID Number Provisioning API
Search, order, configure, and release virtual phone numbers in 145 countries programmatically. Build number management directly into your application — no dashboard required.
What Is DID Provisioning?
DID (Direct Inward Dialing) provisioning is the process of programmatically acquiring a real local phone number and configuring where calls to that number are delivered. Instead of logging into a dashboard to buy a number, your application calls the Israelnumber API to search available numbers, assign one to your account, set its forwarding destination, and release it when no longer needed — all in seconds, at any scale.
API Endpoint Reference
All calls use HTTP POST. Obtain your account_token from the Login endpoint first and include it, along with your account id, in every subsequent request. Base URL: https://newsip.israelnumber.com
| Endpoint | What It Does | Key Parameters |
|---|---|---|
| POST /api/login/ | Log in, receive id and account_token for all subsequent calls | username, password |
| POST /customer/did_crud/ | Search available DIDs in a country (action=list) | action, country_id, id, token |
| POST /customer/did_management/ | Purchase and assign a DID to your account (action=assign) | action, did_id, accountid, id, token |
| POST /customer/did_crud/ | List all DIDs purchased on your account (action=purchase_list) | action, id, token |
| POST /customer/did_management/ | Set call forwarding — always, on busy, not registered, or no answer | did_id, call_type, call_type_value, always, user_busy, user_not_registered, no_answer |
| POST /customer/did_management/ | Release a DID and remove it from your account (action=release) | action, did_id, id, token |
Complete Flow: Search → Order → Configure → Release
Full Python example walking through the entire DID lifecycle.
import requests
BASE = "https://newsip.israelnumber.com"
# ── 1. Login ────────────────────────────────────────────────
res = requests.post(f"{BASE}/api/login/",
data={"username": "YOUR_ACCOUNT_NUMBER", "password": "YOUR_PASSWORD"})
login_data = res.json()
account_id = login_data["id"]
token = login_data["account_token"]
# ── 2. List available numbers in France ─────────────────────
avail = requests.post(f"{BASE}/customer/did_crud/", data={
"action": "list",
"country_id": "FR",
"id": account_id,
"token": token
})
dids = avail.json()["dids"]
print(f"Found {len(dids)} French numbers")
# Print first 3 options
for d in dids[:3]:
print(f" {d['did_number']} ${d['monthly_cost']}/mo")
# ── 3. Assign the first available number ────────────────────
chosen_id = dids[0]["did_id"]
assign = requests.post(f"{BASE}/customer/did_management/", data={
"action": "assign",
"did_id": chosen_id,
"accountid": account_id,
"id": account_id,
"token": token
})
print("Assigned:", assign.json())
# ── 4. Set forwarding to an external (PSTN) number ──────────
fwd = requests.post(f"{BASE}/customer/did_management/", data={
"did_id": chosen_id,
"id": account_id,
"token": token,
"always": "+33612345678" # French mobile number, or SIP: user@domain
})
print("Forwarding configured:", fwd.json())
# ── 5. Later: list all your purchased numbers ────────────────
my_dids = requests.post(f"{BASE}/customer/did_crud/", data={
"action": "purchase_list",
"id": account_id,
"token": token
})
print("My numbers:", [d["did_number"] for d in my_dids.json()["dids"]])
# ── 6. Release the number when done ─────────────────────────
release = requests.post(f"{BASE}/customer/did_management/", data={
"action": "release",
"did_id": chosen_id,
"id": account_id,
"token": token
})
print("Released:", release.json())More API Guides
|
| ||||
|
|
FAQ — DID Provisioning API
How do I buy a virtual phone number via API?
Log in via the API to receive your account id and token. Then call the DID Available List endpoint (/customer/did_crud/, action=list) with your target country ID to see available numbers. Use DID Assign (/customer/did_management/, action=assign) with the did_id of your chosen number to purchase and add it to your account.
Can I release a number programmatically when I no longer need it?
Yes. Calling /customer/did_management/ with action=release and the did_id removes a number from your account immediately. This stops billing for that number from the next billing cycle.
What forwarding destination types are supported?
The DID Forward Setting endpoint supports conditions for always-forward, busy, not-registered, and no-answer scenarios, each pointing to a call_type destination such as an extension, external number, or SIP address. The destination can be changed at any time via API.
In which countries can I provision numbers via API?
Israelnumber offers virtual numbers in 145 countries. The Get Country List endpoint returns each country’s ID, which you then pass to the DID Available List endpoint to see numbers currently available for provisioning in that country.
Start Provisioning Numbers Today
Get your free API key and search available numbers in any of 145 countries.