Skip to main content

Hooks - API Documentation

Overview

The Hooks feature lets you automate actions when Countly events or schedules match configured trigger rules.

Key Capabilities

  • Trigger-based automation using internal events, API endpoint triggers, incoming data, or scheduled execution.
  • Effect execution for actions such as HTTP requests, email sending, or custom code.
  • Rule-level enable/disable control and test execution before production use.

Database Collections

CollectionPurpose
countly.hooksStores hook rules, trigger/effect configurations, enabled state, metadata, and recent error logs.
countly.membersStores dashboard user profiles used for access checks and creator display names.
countly.appsStores app definitions used during permission and app-context validation.

Configuration & Settings

Hooks behavior is affected by hooks configuration values:

  • refreshRulesPeriod: Refresh interval for loading enabled hook rules into runtime cache.
  • pipelineInterval: Delay between effect-processing loop iterations.
  • batchActionSize: Maximum queued actions processed per pipeline iteration (0 falls back to internal default batch size).
  • requestLimit: Per-hook execution cap per time window (0 disables throttling).
  • timeWindowForRequestLimit: Time window (milliseconds) used with requestLimit.

Last Updated

2026-02-17