RocketChat / RocketChat/Rocket.Chat

[Feature] Expose new user behaviour metrics via Admin API for moderation tooling

Open
#40,004 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Problem

There is currently no Admin API endpoint that exposes behavioural metrics for new user accounts (accounts < 90 days old), such as:

  • Messages sent per hour
  • Number of distinct rooms messaged
  • DM initiation rate
  • URL density in messages

Proposed Solution

Add a new REST endpoint:
GET /api/v1/admin/users/behaviour-metrics?userId=xxx

Returning a structured JSON response with the above metrics for a given user, scoped to the last 7 / 30 / 90 days.

Why this matters

This endpoint would enable third-party Apps Engine apps and external moderation tools to build risk scoring systems on top of Rocket.Chat without needing direct database access.

— Saksham Jain (@jainsaksham2006), GSoC 2026 applicant for New Users Anti Spammer System

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing Admin API REST endpoints and the data sources for user messages, rooms, direct messages, and URLs. Define how each metric is calculated for the 7-, 30-, and 90-day scopes, then expose the structured response for the specified user and verify the endpoint with API tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics, api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.