Skip to main content

Unlink Number from App

Remove a phone number from a SFVoPI application. After unlinking, the number will no longer route calls to this app and will become available to link to other apps.

info

After unlinking, the number will appear in the available numbers list and can be linked to a different SFVoPI app.

Authentication

Requires X-API-Key header with a valid API key. See Authentication for details.

Endpoint

DELETE /sfvopi/apps/:app_id/numbers/:voip_number

Path Parameters

ParameterTypeRequiredDescription
app_idstringYesThe unique identifier of the SFVoPI app
voip_numberstringYesThe phone number to unlink (E.164 format, e.g., +918000000001)

No request body required.

Code Examples

curl -X DELETE https://prod-api.superfone.co.in/superfone/sfvopi/apps/app_abc123/numbers/+918000000001 \
-H "X-API-Key: your_api_key_here"

Success Response

Status Code: 200 OK

{
"data": {
"deleted": true
},
"message": "success"
}

Response Fields

FieldTypeDescription
dataobjectDeletion confirmation object
data.deletedbooleanAlways true on successful deletion
messagestringResponse message (always "success" on success)

Error Responses

Status CodeMessageWhen It Occurs
404App not foundThe specified app_id doesn't exist or doesn't belong to your organization
404Number not linked to this appThe phone number is not currently linked to the specified app
401UnAuthorized, Please Provide Valid API KeyMissing or invalid X-API-Key header
500Failed to unlink number: <error>Server error while unlinking the number

URL Encoding

Since phone numbers contain the + character, you must URL-encode the voip_number path parameter:

OriginalURL-Encoded
+918000000001%2B918000000001

Most HTTP libraries handle this automatically:

  • JavaScript/TypeScript: encodeURIComponent('+918000000001')
  • Python: urllib.parse.quote('+918000000001')
  • cURL: Use + directly (cURL handles encoding)

Notes

  • Immediate effect: Once unlinked, incoming calls to this number will no longer route to the app
  • Availability: The number becomes available to link to other apps immediately
  • Idempotent: Attempting to unlink a number that's not linked returns a 404 error
  • E.164 format: The voip_number parameter must be in E.164 format (e.g., +918000000001)

Next Steps