> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# User Last Activity Report

> Export per-user last read & write timestamps to identify inactive accounts and drive re‑engagement or cleanup actions

## Overview

The User Last Activity Report provides the most recent timestamps of key actions (read + write) per user. Administrators use it to:

* Identify inactive / dormant accounts
* Drive re‑engagement campaigns (email / push)
* Plan archival or deletion workflows (e.g., GDPR cleanup)
* Validate growth & retention metrics against real interaction

> [!NOTE]
>
> Requires an **admin session**. These endpoints are for server / internal tooling only—never expose admin credentials to clients.

## When To Use

Use this report when you need a lightweight snapshot of user activity recency rather than full behavioral analytics. For richer metrics (MAU/DAU, content engagement) see the broader **Analytics APIs** in the [API Overview](/analytics-and-moderation/social+-apis-and-services/README.md).

## Access & Permissions

* Admin credentials (admin token) required in Authorization header
* Scoped to your network / application only
* Rate limits apply (avoid high-frequency polling—prefer scheduled exports)
* **Minimum 5,000 users required** in your application to generate the report

> [!WARNING]
>
> Do not embed admin token logic in front-end code. Generate and process reports using a secure backend or internal admin tool.

> [!NOTE]
>
> **User Count Requirement**: Your application must have at least 5,000 users to generate the User Last Activity Report. If your application has fewer users, the report generation will not be available.

## Export Flow

**1. Authenticate Admin Session**

Submit credentials to obtain an authenticated admin session (token-based).

**2. Request Report Export**

Call the report endpoint. Response will return in CSV format.

**3. Process & Act**

Using the CSV output to trigger re‑engagement or cleanup workflows (bulk user delete API).

## API Contract (High-Level)

| Aspect | Value |
| - | - |
| Method | GET |
| Path | `/api/v1/reports/user-last-activity` |
| Auth | Admin token |
| Format | CSV |

> [!TIP]
>
> Prefer cursor-based pagination (if available) for large networks instead of increasing page size.

### Request

> [card] [View Full API Reference](/api-reference/user/get-users-last-activity-report.md)
>
> See complete request/response schemas, parameters, and examples. This API only accepts admin token as authorization.

## Interpreting Results

The report returns a CSV with the following columns:

| Column | Description |
| - | - |
| `user_id` | Internal user identifier |
| `user_public_id` | Public-facing user ID |
| `display_name` | User's display name |
| `last_active_utc` | Most recent activity timestamp (UTC) |

### Activity Patterns

| Scenario | Interpretation | Suggested Action |
| - | - | - |
| `last_active_utc` is null | Newly created / never logged in | Onboarding reminder |
| `last_active_utc` \< 30 days ago | Active user | Continue regular engagement |
| `last_active_utc` 30-90 days ago | At-risk user | Re-engagement campaign |
| `last_active_utc` ≥ 90 days ago | Dormant account | Re‑engagement or archival workflow |

## Automation Ideas

> [accordion] Re‑Engagement Campaigns
>
> Export weekly, filter users with `last_active_utc` older than threshold, send personalized email or push, measure reactivation rate.

> [accordion] Dormant Cleanup
>
> Flag accounts inactive > 180 days for soft archival. After notice period, proceed with deletion respecting compliance rules.

> [accordion] Bulk Delete Inactive Users
>
> Use the CSV output directly with the [Bulk User Delete API](/api-reference/user/create-bulk-user-delete-job.md) to clean up inactive accounts. The API accepts the CSV format from this report, making it seamless to process dormant users at scale while maintaining audit trails.

> [accordion] Security Monitoring
>
> Detect sudden stop in activity of high‑value users—trigger internal review or outreach.

## Troubleshooting

| Issue | Possible Cause | Fix |
| - | - | - |
| 401 / Unauthorized | Missing / expired admin cookie | Re-authenticate and resend request |
| Report not available | Application has fewer than 5,000 users | Wait until your application reaches 5,000 users minimum |
| Empty dataset | Filters defaulting to restrictive scope (if any) | Remove params / verify user activity exists |
| Missing columns | Feature disabled / retention policy | Confirm configuration; adapt parsing |
| Slow export | Large dataset without pagination | Use pagination or request CSV streaming |

> [!TIP]
>
> Always log the raw HTTP status + response headers for diagnostics. Store processed data separately from raw export for reproducibility.

## Related

> [card] [API Overview](/analytics-and-moderation/social+-apis-and-services/README.md)
>
> All admin & analytics APIs

> [card] [Webhook Events](/analytics-and-moderation/social+-apis-and-services/webhook-event.md)
>
> Real-time notifications

> [card] [Pre-Hook Events](/analytics-and-moderation/social+-apis-and-services/pre-hook-event.md)
>
> Intercept & modify events

***

If you have questions, contact support at [[support@social.plus](mailto:support@social.plus)](mailto:support@social.plus).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.