Skip to main content

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 -X GET https://prod-api.superfone.co.in/superfone/sfvopi/available-numbers \
-H "X-API-Key: your_api_key_here"

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

FieldTypeDescription
dataarrayArray of available number objects
data[].idnumberUnique identifier for the number record
data[].voip_numberstringPhone number in E.164 format (e.g., +918000000001)
data[].providerstringTelephony provider for this number (e.g., exotel, plivo)
data[].statusstringNumber status (typically ACTIVE for available numbers)
messagestringResponse message (always "success" on success)

Error Responses

Status CodeMessageWhen It Occurs
401UnAuthorized, Please Provide Valid API KeyMissing or invalid X-API-Key header
500Failed 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_number value when linking a number to an app via Link Number
  • The provider field indicates which telephony provider manages the number (for informational purposes)

Next Steps