Access team metrics, usage data, and spending information via API
The Admin API lets you programmatically access your team’s data, including member information, usage metrics, and spending details. Perfect for building custom dashboards, monitoring tools, or integrating with your existing workflows.
The API is currently in its first release. We’re actively expanding capabilities based on user feedback, so let us know what endpoints you’d like to see next!
Authentication
All API requests require authentication using an API key. Only team administrators can create and manage API keys.
Creating an API Key
- Navigate to cursor.com/dashboard → Admin API Keys in your dashboard
- Click Create New API Key
- Give your key a descriptive name (e.g., “Usage Dashboard Integration”)
- Copy the generated key immediately - you won’t be able to see it again!
Format of the key is key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Using Your API Key
Use your API key as the username in basic authentication. You can do this in two ways:
Using curl with basic auth:
Or by setting the Authorization header directly:
Base URL
All API endpoints use the following base URL:
Endpoints
Get Team Members
Retrieve a list of all team members and their details.
Response
Returns an array of team member objects:
Example Response
Example Request
Get Daily Usage Data
Retrieve detailed daily usage metrics for your team within a specified date range. This endpoint provides comprehensive insights into how your team uses Cursor, including code edits, AI assistance usage, and acceptance rates.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
startDate | number | Yes | Start date in epoch milliseconds |
endDate | number | Yes | End date in epoch milliseconds |
Date range cannot exceed 90 days. For longer periods, make multiple requests.
Response
Response Fields Explained
Field | Description |
---|---|
date | Date in epoch milliseconds |
isActive | Whether the user was active on this day |
totalLinesAdded | Total lines of code added |
totalLinesDeleted | Total lines of code deleted |
acceptedLinesAdded | Lines added that were accepted from AI suggestions |
acceptedLinesDeleted | Lines deleted that were accepted from AI suggestions |
totalApplies | Total number of apply operations |
totalAccepts | Total number of accepted suggestions |
totalRejects | Total number of rejected suggestions |
totalTabsShown | Number of tab completions shown |
totalTabsAccepted | Number of tab completions accepted |
composerRequests | Requests made through Composer |
chatRequests | Requests made through Chat |
agentRequests | Requests made through Agent |
cmdkUsages | Command palette (Cmd+K) usages |
subscriptionIncludedReqs | Requests included in subscription |
apiKeyReqs | Requests made via API key |
usageBasedReqs | Pay-per-use requests |
bugbotUsages | Bug detection bot usages |
mostUsedModel | Most frequently used AI model |
applyMostUsedExtension | Most used file extension for applies |
tabMostUsedExtension | Most used file extension for tabs |
clientVersion | Cursor client version |
email | User email (when available) |
Example Response
Example Request
Get Spending Data
Retrieve detailed spending information within the current calendar month for team members with search, sorting, and pagination options.
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
searchTerm | string | No | Search term to filter results (searches in user names and emails) |
sortBy | string | No | Field to sort by. Options: amount , date , user . Default: date |
sortDirection | string | No | Sort direction. Options: asc , desc . Default: desc |
page | number | No | Page number (1-indexed). Default: 1 |
pageSize | number | No | Number of results per page. |
Response
Response Fields Explained
Field | Description |
---|---|
spendCents | Total spend in cents |
fastPremiumRequests | Number of fast premium model requests |
name | Team member’s name |
email | Team member’s email |
role | Member role in the team |
hardLimitOverrideDollars | Custom spending limit override in dollars |
subscriptionCycleStart | Start of current subscription cycle (epoch milliseconds) |
totalMembers | Total number of team members |
totalPages | Total number of pages available |
Example Response
Example Requests
Basic spending data with default pagination:
Get spend for a specific user with custom pagination: