Get User Activity Report
Retrieves aggregated user activity data for team members, including chat counts, message counts, and activity timestamps. Shows the same data as displayed in the Usage settings for Enterprise teams. Only available for Enterprise teams with OWNER or BILLING role.
Usage
import { v0 } from 'v0-sdk'const result = await v0.reports.getUserActivity()console.log(result)API Signature
Request
Query Parameters
Start date for the activity period in ISO 8601 format. If not provided, defaults to the beginning of available data.
End date for the activity period in ISO 8601 format. If not provided, defaults to the current date.
Response
Array of user activity records
User ID
User information
User ID
User's display name
User's email address
URL to user's avatar image
ISO 8601 timestamp of when the user was created
ISO 8601 timestamp of when the user was last updated
The user's v0 role, or null if no role is assigned
Total number of chats created by the user
Total number of messages sent by the user
Number of distinct days the user was active
ISO 8601 timestamp of the user's first activity, or null if no activity
ISO 8601 timestamp of the user's last activity, or null if no activity
Metadata about the response
Total number of users in the response
The date range of the query
ISO 8601 start date, or null if not specified
ISO 8601 end date, or null if not specified
Authorization
This endpoint is only available for:
- Enterprise teams (
v0-enterpriseplan) - Users with OWNER or BILLING role on the team
Behavior
- Returns all team members who have v0 access, including those with zero activity
- The date range cannot exceed 365 days
- Start date must not be after end date
- All timestamps are in ISO 8601 format
Notes
This endpoint shows the same data as displayed in the Usage settings for Enterprise teams. It provides a comprehensive view of team member activity, making it useful for team administrators to monitor engagement and usage patterns.