Delete App
Delete an app from your organization. This action is permanent and cannot be undone. All data associated with the app will be deleted.
Endpoint
text
DELETE /v1/apps/{id}
Authentication
text
X-API-Key: apps_your_api_key
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
string | The app ID |
Response
Success (200 OK)
json
{
"success": true,
"message": "App deleted successfully"
}
Error (404 Not Found)
json
{
"error": "App not found"
}
Examples
Delete App (cURL)
bash
curl -X DELETE https://api.appizer.com/v1/apps/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: apps_your_api_key"
Delete App with Confirmation (JavaScript/Node.js)
javascript
const apiKey = 'apps_your_api_key';
const appId = '550e8400-e29b-41d4-a716-446655440000';
async function deleteAppWithConfirmation() {
// In a real application, get user confirmation first
const confirmed = confirm(
'Are you sure you want to delete this app? This action cannot be undone and all data will be permanently deleted.'
);
if (!confirmed) {
console.log('Delete cancelled');
return;
}
const response = await fetch(
`https://api.appizer.com/v1/apps/${appId}`,
{
method: 'DELETE',
headers: {
'X-API-Key': apiKey
}
}
);
const result = await response.json();
if (result.success) {
console.log('App deleted successfully');
} else {
console.error(`Error: ${result.error}`);
}
}
// Usage
deleteAppWithConfirmation();
Delete App with Python
python
api_key = 'apps_your_api_key'
app_id = '550e8400-e29b-41d4-a716-446655440000'
headers = {
'X-API-Key': api_key
}
# Confirm deletion
confirmation = input(f'Delete app {app_id}? (yes/no): ')
if confirmation.lower() == 'yes':
response = requests.delete(
f'https://api.appizer.com/v1/apps/{app_id}',
headers=headers
)
result = response.json()
if result.get('success'):
print('App deleted successfully')
else:
print(f"Error: {result.get('error')}")
else:
print('Deletion cancelled')
Delete Multiple Apps (JavaScript/Node.js)
javascript
const apiKey = 'apps_your_api_key';
async function deleteMultipleApps(appIds) {
const results = [];
for (const appId of appIds) {
try {
const response = await fetch(
`https://api.appizer.com/v1/apps/${appId}`,
{
method: 'DELETE',
headers: {
'X-API-Key': apiKey
}
}
);
const result = await response.json();
if (result.success) {
results.push({ appId, success: true });
console.log(`✓ Deleted app ${appId}`);
} else {
results.push({ appId, success: false, error: result.error });
console.log(`✗ Failed to delete app ${appId}: ${result.error}`);
}
} catch (error) {
results.push({ appId, success: false, error: error.message });
console.log(`✗ Error deleting app ${appId}: ${error.message}`);
}
// Small delay between deletions to avoid overwhelming the server
await new Promise(resolve => setTimeout(resolve, 100));
}
return results;
}
// Usage
const appsToDelete = [
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001',
'550e8400-e29b-41d4-a716-446655440002'
];
deleteMultipleApps(appsToDelete).then(results => {
const successful = results.filter(r => r.success).length;
console.log(`Deleted ${successful}/${results.length} apps`);
});
Important Notes
⚠️ WARNING: Deletion is permanent and cannot be undone.
When you delete an app:
- All events associated with the app are deleted
- All users tracked by the app are deleted
- All campaigns associated with the app are deleted
- The app's API key becomes invalid
- All webhooks for the app stop working
Before Deleting
Consider:
- Export data - Download any important analytics or reports before deleting
- Notify your team - Make sure no one else is using the app's API key
- Check integrations - Verify no external systems are still using this app
- Backup information - Store the app ID and API key for records if needed
Alternative: Disable Instead of Delete
If you want to preserve the app but stop tracking events, consider updating the app instead of deleting it.
Next Steps
- List all your apps - View remaining apps
- Create a new app - Create a replacement if needed