Skip to main content

Concurrent Users - Delete Alert

Endpoint

/i/concurrent_alert/delete

Enterprise Only
This API is available exclusively in Countly Enterprise.

Overview

Permanently remove an online user alert from your application. This stops all monitoring and notifications associated with the alert. The deletion is permanent and cannot be undone.

Authentication

  • Authentication methods:
    • API Key (parameter): api_key=YOUR_API_KEY
    • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
    • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Required permission: Delete on the alerts feature

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key for authentication
auth_tokenStringYes (or api_key)Auth token for authentication
app_idStringYesApplication identifier
alertIdStringYesAlert ObjectID to delete (MongoDB format)

Response

Success Response

{
"result": "Deleted an alert"
}

Response Fields

FieldTypeDescription
resultStringStatus message confirming deletion

Error Responses

HTTP StatusError ResponseDescription
200{\"result\": \"Failed to delete the alert\"}Alert not found or deletion failed
500{\"result\": \"Failed to delete the alert\"}Database or server error during deletion

Behavior/Processing

  • Requires Delete permission on the shared alerts feature.
  • Converts alertId to a MongoDB ObjectID and removes the alert matching both _id=alertId and app=app_id.
  • On successful remove callback, writes an online_users_alert_deleted system log with the deleted alert_id.
  • The success response does not include a deleted count; an unmatched but syntactically valid alertId can still return Deleted an alert.
  • Invalid ObjectID conversion or other synchronous delete failures return Failed to delete the alert.

Database Collections

CollectionUsed forData touched by this endpoint
countly.concurrent_users_alertsEndpoint data sourceStores endpoint-related records this endpoint reads or modifies.
countly.systemlogsAudit trailContains system action records used by this endpoint for audit output or audit writes.

Limitations

  • Alert deletion is permanent and cannot be undone
  • Cannot batch delete multiple alerts in a single request

Examples

Example: Delete an alert

curl -X POST "https://your-server.com/i/concurrent_alert/delete" \
-d "api_key=YOUR_API_KEY" \
-d "app_id=YOUR_APP_ID" \
-d "alertId=507f1f77bcf86cd799439011"

Ⓔ Enterprise

This feature is part of Countly Enterprise.

Get Access:

Last Updated: 2026-04-18


Last Updated

2026-04-18