Update event status
Enterprise
This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Endpoint
/i/data-manager/event/toggle-status
Overview
Sets status for selected events and updates visibility in event map.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
Requires data_manager Update permission.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
app_id | String | Yes | Target app ID. |
events | JSON String (Array) | Yes | Array of event keys to update. |
status | String | Yes | New status value (for example created, approved, live, blocked, unplanned). |
api_key | String | Conditional | Required if auth_token is not provided. |
auth_token | String | Conditional | Required if api_key is not provided. |
events Array Structure
events is a JSON-stringified array of event keys.
Decoded example:
["purchase", "signup"]
Examples
Set events to live
/i/data-manager/event/toggle-status?
app_id=64f5c0d8f4f7ac0012ab3456&
events=["purchase","signup"]&
status=live
Set events to unplanned
/i/data-manager/event/toggle-status?
app_id=64f5c0d8f4f7ac0012ab3456&
events=["purchase"]&
status=unplanned
Response
Success Response
"Success"
Response Fields
| Field | Type | Description |
|---|---|---|
(root value) | String | Success when status updates are applied. |
Error Responses
500
{
"result": "Error"
}
Behavior
- Updates
statusincountly_drill.drill_metafor selected events. - Computes
is_visiblefrom status anddata-manager.allowUnplannedEventsconfig. - Updates
countly.events.map.{event}.is_visible. - Writes
dm-event-editsystem log and invalidates cache.
Operational Considerations
- This endpoint updates both drill metadata and event-map visibility in one request.
- Large
eventsarrays can trigger many map updates; prefer batching for very large metadata changes.
Related Endpoints
Implementation details
Configuration Impact
| Setting | Default | Affects | User-visible impact |
|---|---|---|---|
data-manager.allowUnplannedEvents | ALLOW | Visibility assignment when status=unplanned | If set to ALLOW, unplanned events can remain visible; if set to DISALLOW, they are forced hidden. |
Audit & System Logs
| Action | Trigger | Payload |
|---|---|---|
dm-event-edit | After status update for selected events | { action: "UPDATE_STATUS", status, ev: [eventKeys] } |
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly_drill.drill_meta | Event status storage | Updates status for each selected event metadata document. |
countly.events | Event visibility map | Updates map.{event}.is_visible based on status and unplanned-event config. |
countly.systemlogs | Audit trail | Writes dm-event-edit with UPDATE_STATUS context. |