Real-Time Counts


This endpoint enables you to get a real-time count of active users in the past five minutes in your app. The results can be spliced by user_type, session_source, browser, os, and device for active and new users.

Base URL

Here is an example base URL from the account in the India region:


Refer Region for more details.

HTTP Method



Refer Headers for more details.

Body Parameters

The body is uploaded as a JSON payload. An empty payload {} will return a real-time count of active users.

ParameterDescriptionRequiredTypeExample Value
user_typeIf set to true, will return the split of users by type.optionalbooleantrue

Below is an example payload.

	"user_type": true

Example Request

Here is an example cURL request to the Real-Time Counts API showing the headers needed to authenticate the request from the account in the India region:

curl -X POST -d '{"user_type":true}' "" \
-H "X-CleverTap-Account-Id: ACCOUNT_ID" \
-H "X-CleverTap-Passcode: PASSCODE" \
-H "Content-Type: application/json"
require 'net/http'
require 'uri'
require 'json'

uri = URI.parse("")
request =
request.content_type = "application/json"
request["X-Clevertap-Account-Id"] = "ACCOUNT_ID"
request["X-Clevertap-Passcode"] = "PASSCODE"
request.body = JSON.dump({
  "user_type" => true

req_options = {
  use_ssl: uri.scheme == "https",

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
import requests

headers = {
    'X-CleverTap-Account-Id': 'ACCOUNT_ID',
    'X-CleverTap-Passcode': 'PASSCODE',
    'Content-Type': 'application/json',

data = '{"user_type":true}'

response ='', headers=headers, data=data)
$headers = array(
    'X-CleverTap-Account-Id' => 'ACCOUNT_ID',
    'X-CleverTap-Passcode' => 'PASSCODE',
    'Content-Type' => 'application/json'
$data = '{"user_type":true}';
$response = Requests::post('', $headers, $data);
var request = require('request');

var headers = {
    'X-CleverTap-Account-Id': 'ACCOUNT_ID',
    'X-CleverTap-Passcode': 'PASSCODE',
    'Content-Type': 'application/json'

var dataString = '{"user_type":true}';

var options = {
    url: '',
    method: 'POST',
    headers: headers,
    body: dataString

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {

request(options, callback);

Example Response

  "status": "success",
  "count": 214

Here is an example response if you set user_type parameter to true.

  "status": "success",
  "count": 214,
  "user_type": {
    "new": 58


The response will be a JSON object containing either the success or fail status.

If no payload was provided and the request was successful, the response will include a count of active users in real-time.

  "status": "success",
  "count": 214

For more information on request limit, refer to API Request Limit.

To understand the common queries and concerns related to CleverTap APIs, refer to API FAQs.