Skip to main content

Countly API Documentation

Welcome to the Countly Server API reference. This documentation covers all read (GET /o/...) and write (POST /i/...) endpoints across the core platform and enterprise plugins.

Authentication​

All API calls require authentication. There are multiple ways to authenticate depending on the type of endpoint.

API Key vs App Key​

Countly uses two different keys for different purposes:

KeyPurposeUsed byHow to obtain
api_keyDashboard / server-side access. Grants full read & write access as the associated user. Use for management, analytics reads, and any server-to-server call.Server / admin scriptsManagement → API Key in the dashboard
app_keySDK / client-side access. Identifies the application and allows only data ingestion (write) endpoints (/i, /i/...). It is safe to embed in client apps because it cannot read data.SDKs, client appsManagement → Apps → App Key

Rule of thumb: if the endpoint path starts with /i and is called from a client device or SDK, use app_key. For everything else (reading data via /o, managing apps, users, etc.) use api_key or an auth token.

Auth Token (parameter)​

Instead of api_key, you can pass an auth token as the auth_token query parameter or in the request body:

GET /o?auth_token=YOUR_TOKEN&app_id=APP_ID&method=...

Auth tokens can be scoped to specific apps, endpoints, and have a configurable TTL. Create them via the Token API.

Auth Token (header)​

You can also pass the auth token in the countly-token HTTP header:

GET /o?app_id=APP_ID&method=...
countly-token: YOUR_TOKEN

This is the recommended approach for server-to-server integrations as it keeps tokens out of URLs and server logs.

Quick Reference​

ScenarioKey / TokenExample parameter
SDK sending eventsapp_keyapp_key=APP_KEY
SDK sending crash dataapp_keyapp_key=APP_KEY
Reading analytics from serverapi_key or auth_tokenapi_key=API_KEY
Managing apps / usersapi_key or auth_tokencountly-token: TOKEN
Scoped, time-limited accessauth_tokenauth_token=TOKEN

Core API​

The core platform ships with every Countly installation.

CategoryDescription
AnalyticsSessions, users, and technology metrics
App UsersUser profiles, exports, and data subjects
AppsCreate, update, and delete applications
BulkBatch request ingestion
EventsCustom event tracking and management
ExportData export and downloads
User ManagementDashboard user accounts and permissions
TokenAuthentication token management
TasksLong-running task status and results
SDKSDK configuration endpoints
SystemServer health, jobs, and configuration
PluginsPlugin state and management

Enterprise Plugins​

Features marked with Ⓔ require an Enterprise license.

Analytics & Insights​

PluginDescription
Drill ⒺRaw event querying with filters and projections
Funnels ⒺMulti-step conversion funnels
Flows ⒺUser flow visualization
Cohorts ⒺBehavioral user segments
Formulas ⒺCalculated metrics from existing data
Retention Segments ⒺRetention analysis by cohort
Active Users ⒺDaily / weekly / monthly active users
Concurrent Users ⒺReal-time online user count
Activity Map ⒺGeographic session heatmaps
Times of DaySession distribution by hour

User Engagement​

PluginDescription
PushPush notification campaigns
Surveys ⒺIn-app surveys (NPS, ratings, feedback)
Remote ConfigServer-side feature flags and variables
AB Testing ⒺExperiment variants and results
Content ⒺIn-app content management
Journey Engine ⒺAutomated user journeys
AI Assistants ⒺAI-powered insights

Crashes & Errors​

PluginDescription
CrashesCrash reporting and grouping
Crash Symbolication ⒺSymbol file upload and stack trace resolution
Crashes Jira ⒺJira integration for crash groups
Error LogsServer error log viewer

Security & Authentication​

PluginDescription
LDAP ⒺLDAP / Active Directory SSO
Active Directory ⒺAzure AD integration
OIDC ⒺOpenID Connect SSO
Okta ⒺOkta SSO integration
Cognito ⒺAWS Cognito integration
Two-Factor AuthTOTP-based 2FA
reCAPTCHALogin reCAPTCHA protection
Block ⒺIP / device blocking

Data & Infrastructure​

PluginDescription
ClickHouseClickHouse analytics backend
KafkaKafka event streaming
Data Manager ⒺEvent schema and transformation rules
Data MigrationImport / export server data
Config Transfer ⒺTransfer settings between servers
DBViewerDirect database collection browser

Dashboards & Reporting​

PluginDescription
DashboardsCustom dashboard builder
AlertsMetric-based alert rules
ReportsScheduled email reports

Conventions​

  • Read endpoints — GET /o/... — retrieve data; require api_key + app_id.
  • Write endpoints — POST /i/... — create or modify data; may require app_key or api_key.
  • Responses — JSON. Successful calls return the result directly; errors return {"result": "Error message"}.
  • Pagination — List endpoints accept iDisplayStart and iDisplayLength parameters.