Skip to main content
Version: 25.03

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​

ParameterTypeRequiredDescription
app_idStringYesTarget app ID.
eventsJSON String (Array)YesArray of event keys to update.
statusStringYesNew status value (for example created, approved, live, blocked, unplanned).
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired 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​

FieldTypeDescription
(root value)StringSuccess when status updates are applied.

Error Responses​

  • 500
{
"result": "Error"
}

Behavior​

  • Updates status in countly_drill.drill_meta for selected events.
  • Computes is_visible from status and data-manager.allowUnplannedEvents config.
  • Updates countly.events.map.{event}.is_visible.
  • Writes dm-event-edit system log and invalidates cache.

Operational Considerations​

  • This endpoint updates both drill metadata and event-map visibility in one request.
  • Large events arrays can trigger many map updates; prefer batching for very large metadata changes.
Implementation details

Configuration Impact

SettingDefaultAffectsUser-visible impact
data-manager.allowUnplannedEventsALLOWVisibility assignment when status=unplannedIf set to ALLOW, unplanned events can remain visible; if set to DISALLOW, they are forced hidden.

Audit & System Logs

ActionTriggerPayload
dm-event-editAfter status update for selected events{ action: "UPDATE_STATUS", status, ev: [eventKeys] }

Database Collections

CollectionUsed forData touched by this endpoint
countly_drill.drill_metaEvent status storageUpdates status for each selected event metadata document.
countly.eventsEvent visibility mapUpdates map.{event}.is_visible based on status and unplanned-event config.
countly.systemlogsAudit trailWrites dm-event-edit with UPDATE_STATUS context.