Skip to main content

Update event status

Enterprise Only
This API is available exclusively in Countly Enterprise.

Endpoint

/i/data-manager/event/toggle-status

Overview

Sets status for selected events and updates visibility in event map.

Authentication

Countly API supports three authentication methods:

  1. API key query parameter: api_key=YOUR_API_KEY
  2. Auth token query parameter: auth_token=YOUR_AUTH_TOKEN
  3. Auth token header: countly-token: YOUR_AUTH_TOKEN

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"]

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.

Response

Success Response

"Success"

Response Fields

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

Error Responses

  • 500
{
"result": "Error"
}

Behavior/Processing

  • 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.

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.

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

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.


Last Updated

2026-02-16