Skip to main content

Delete App

Permanently delete a SFVoPI application. This action cannot be undone.

Permanent Action

Deleting an app is permanent and cannot be reversed. Any phone numbers linked to this app will be automatically unlinked.

Authentication Required

Requires X-API-Key header. See Authentication for details.

HTTP Request​

DELETE /sfvopi/apps/:app_id

Path Parameters​

ParameterTypeRequiredDescription
app_idstringYesUnique app identifier (format: sfv_app_xxxxxxxxxxxx)

Code Examples​

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

Success Response​

Status Code: 200 OK

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

Response Fields​

FieldTypeDescription
deletedbooleanAlways true when deletion succeeds

Error Responses​

Status CodeMessageWhen It Occurs
404SFVoPI app not foundApp with the specified app_id does not exist or does not belong to your organization
401UnAuthorized, Please Provide Valid API KeyMissing or invalid X-API-Key header
500Failed to delete SFVoPI app: {error}Server error during app deletion

Example Error Response​

{
"message": "SFVoPI app not found"
}

Use Cases​

Delete with Confirmation​

async function deleteApp(appId) {
const confirmed = confirm(`Are you sure you want to delete app ${appId}? This cannot be undone.`);

if (!confirmed) {
console.log('Deletion cancelled');
return;
}

const response = await fetch(`https://prod-api.superfone.co.in/superfone/sfvopi/apps/${appId}`, {
method: 'DELETE',
headers: {
'X-API-Key': 'your_api_key_here'
}
});

const result = await response.json();

if (result.data.deleted) {
console.log('App deleted successfully');
}
}

await deleteApp('sfv_app_abc123xyz456');

Delete with Error Handling​

async function deleteAppSafely(appId) {
try {
const response = await fetch(`https://prod-api.superfone.co.in/superfone/sfvopi/apps/${appId}`, {
method: 'DELETE',
headers: {
'X-API-Key': 'your_api_key_here'
}
});

if (response.status === 404) {
console.error('App not found');
return false;
}

if (!response.ok) {
console.error('Failed to delete app');
return false;
}

const result = await response.json();
return result.data.deleted;
} catch (error) {
console.error('Error deleting app:', error);
return false;
}
}

const deleted = await deleteAppSafely('sfv_app_abc123xyz456');
console.log(`Deletion ${deleted ? 'succeeded' : 'failed'}`);

Bulk Delete Apps​

async function deleteMultipleApps(appIds) {
const results = await Promise.allSettled(
appIds.map(appId =>
fetch(`https://prod-api.superfone.co.in/superfone/sfvopi/apps/${appId}`, {
method: 'DELETE',
headers: { 'X-API-Key': 'your_api_key_here' }
}).then(res => res.json())
)
);

const deleted = results.filter(r => r.status === 'fulfilled').length;
const failed = results.filter(r => r.status === 'rejected').length;

console.log(`Deleted: ${deleted}, Failed: ${failed}`);
}

await deleteMultipleApps([
'sfv_app_abc123xyz456',
'sfv_app_def789ghi012'
]);

Important Notes​

What Happens When You Delete an App​

  1. App is permanently removed from your organization
  2. Linked phone numbers are automatically unlinked — they become available for linking to other apps
  3. Active calls using this app continue until they naturally end
  4. New calls cannot use this app — inbound calls to previously linked numbers will fail until you link them to a new app

Before Deleting​

Consider these alternatives:

  • Create App — Create a new app
  • List Apps — Get all apps for your organization
  • Get App — Retrieve a specific app by ID
  • Update App — Modify app configuration (including disabling)