Get Available Numbers
Retrieve all phone numbers owned by your organization that are not currently linked to any SFVoPI application. These numbers are available to be linked to apps.
info
A phone number can only be linked to one SFVoPI app at a time. Numbers returned by this endpoint are those that are currently unassigned and ready to use.
Authentication
Requires X-API-Key header with a valid API key. See Authentication for details.
Endpoint
GET /sfvopi/available-numbers
No request body required.
Code Examples
- cURL
- JavaScript
- TypeScript
- Python
curl -X GET https://prod-api.superfone.co.in/superfone/sfvopi/available-numbers \
-H "X-API-Key: your_api_key_here"
const response = await fetch('https://prod-api.superfone.co.in/superfone/sfvopi/available-numbers', {
method: 'GET',
headers: {
'X-API-Key': 'your_api_key_here'
}
});
const data = await response.json();
console.log(data.data); // Array of available number objects
interface AvailableNumber {
id: number;
voip_number: string;
provider: string;
status: string;
}
interface ApiResponse<T> {
data: T;
message: string;
}
const response = await fetch('https://prod-api.superfone.co.in/superfone/sfvopi/available-numbers', {
method: 'GET',
headers: {
'X-API-Key': 'your_api_key_here'
}
});
const result: ApiResponse<AvailableNumber[]> = await response.json();
console.log(result.data); // Array of available numbers
import requests
url = 'https://prod-api.superfone.co.in/superfone/sfvopi/available-numbers'
headers = {
'X-API-Key': 'your_api_key_here'
}
response = requests.get(url, headers=headers)
data = response.json()
print(data['data']) # List of available number objects
Success Response
Status Code: 200 OK
{
"data": [
{
"id": 12345,
"voip_number": "+918000000001",
"provider": "exotel",
"status": "ACTIVE"
},
{
"id": 12346,
"voip_number": "+918000000002",
"provider": "plivo",
"status": "ACTIVE"
}
],
"message": "success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
data | array | Array of available number objects |
data[].id | number | Unique identifier for the number record |
data[].voip_number | string | Phone number in E.164 format (e.g., +918000000001) |
data[].provider | string | Telephony provider for this number (e.g., exotel, plivo) |
data[].status | string | Number status (typically ACTIVE for available numbers) |
message | string | Response message (always "success" on success) |
Error Responses
| Status Code | Message | When It Occurs |
|---|---|---|
401 | UnAuthorized, Please Provide Valid API Key | Missing or invalid X-API-Key header |
500 | Failed to get available numbers: <error> | Server error while fetching numbers |
Notes
- Available numbers are those owned by your organization that are not linked to any SFVoPI app
- Numbers that are linked to apps will not appear in this list
- Use the returned
voip_numbervalue when linking a number to an app via Link Number - The
providerfield indicates which telephony provider manages the number (for informational purposes)
Next Steps
- Link Number — Assign an available number to a SFVoPI app
- List Numbers — View numbers linked to a specific app
- Create App — Create a new SFVoPI application