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

  1. Navigate to cursor.com/dashboardAdmin API Keys in your dashboard
  2. Click Create New API Key
  3. Give your key a descriptive name (e.g., “Usage Dashboard Integration”)
  4. 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:

curl https://api.cursor.com/{route} -u API_KEY:

Or by setting the Authorization header directly:

Authorization: Basic {base64_encode('API_KEY:')}

Base URL

All API endpoints use the following base URL:

https://api.cursor.com

Endpoints

Get Team Members

Retrieve a list of all team members and their details.

GET /teams/members

Response

Returns an array of team member objects:

{
  name: string;
  email: string;
  role: 'owner' | 'member' | 'free-owner';
}[]

Example Response

[
  {
    "name": "Alex",
    "email": "developer@company.com",
    "role": "member"
  },
  {
    "name": "Sam",
    "email": "admin@company.com",
    "role": "owner"
  },
]

Example Request

curl -X GET https://api.cursor.com/teams/members \
  -u YOUR_API_KEY:

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.

POST /teams/daily-usage-data

Request Body

ParameterTypeRequiredDescription
startDatenumberYesStart date in epoch milliseconds
endDatenumberYesEnd date in epoch milliseconds

Date range cannot exceed 90 days. For longer periods, make multiple requests.

Response

{
  data: {
    date: number;
    isActive: boolean;
    totalLinesAdded: number;
    totalLinesDeleted: number;
    acceptedLinesAdded: number;
    acceptedLinesDeleted: number;
    totalApplies: number;
    totalAccepts: number;
    totalRejects: number;
    totalTabsShown: number;
    totalTabsAccepted: number;
    composerRequests: number;
    chatRequests: number;
    agentRequests: number;
    cmdkUsages: number;
    subscriptionIncludedReqs: number;
    apiKeyReqs: number;
    usageBasedReqs: number;
    bugbotUsages: number;
    mostUsedModel: string;
    applyMostUsedExtension?: string;
    tabMostUsedExtension?: string;
    clientVersion?: string;
    email?: string;
  }[];
  period: {
    startDate: number;
    endDate: number;
  };
}

Response Fields Explained

FieldDescription
dateDate in epoch milliseconds
isActiveWhether the user was active on this day
totalLinesAddedTotal lines of code added
totalLinesDeletedTotal lines of code deleted
acceptedLinesAddedLines added that were accepted from AI suggestions
acceptedLinesDeletedLines deleted that were accepted from AI suggestions
totalAppliesTotal number of apply operations
totalAcceptsTotal number of accepted suggestions
totalRejectsTotal number of rejected suggestions
totalTabsShownNumber of tab completions shown
totalTabsAcceptedNumber of tab completions accepted
composerRequestsRequests made through Composer
chatRequestsRequests made through Chat
agentRequestsRequests made through Agent
cmdkUsagesCommand palette (Cmd+K) usages
subscriptionIncludedReqsRequests included in subscription
apiKeyReqsRequests made via API key
usageBasedReqsPay-per-use requests
bugbotUsagesBug detection bot usages
mostUsedModelMost frequently used AI model
applyMostUsedExtensionMost used file extension for applies
tabMostUsedExtensionMost used file extension for tabs
clientVersionCursor client version
emailUser email (when available)

Example Response

{
  "data": [
    {
      "date": 1710720000000,
      "isActive": true,
      "totalLinesAdded": 1543,
      "totalLinesDeleted": 892,
      "acceptedLinesAdded": 1102,
      "acceptedLinesDeleted": 645,
      "totalApplies": 87,
      "totalAccepts": 73,
      "totalRejects": 14,
      "totalTabsShown": 342,
      "totalTabsAccepted": 289,
      "composerRequests": 45,
      "chatRequests": 128,
      "agentRequests": 12,
      "cmdkUsages": 67,
      "subscriptionIncludedReqs": 180,
      "apiKeyReqs": 0,
      "usageBasedReqs": 5,
      "bugbotUsages": 3,
      "mostUsedModel": "gpt-4",
      "applyMostUsedExtension": ".tsx",
      "tabMostUsedExtension": ".ts",
      "clientVersion": "0.25.1",
      "email": "developer@company.com"
    },
    {
      "date": 1710806400000,
      "isActive": true,
      "totalLinesAdded": 2104,
      "totalLinesDeleted": 1203,
      "acceptedLinesAdded": 1876,
      "acceptedLinesDeleted": 987,
      "totalApplies": 102,
      "totalAccepts": 91,
      "totalRejects": 11,
      "totalTabsShown": 456,
      "totalTabsAccepted": 398,
      "composerRequests": 67,
      "chatRequests": 156,
      "agentRequests": 23,
      "cmdkUsages": 89,
      "subscriptionIncludedReqs": 320,
      "apiKeyReqs": 15,
      "usageBasedReqs": 0,
      "bugbotUsages": 5,
      "mostUsedModel": "claude-3-opus",
      "applyMostUsedExtension": ".py",
      "tabMostUsedExtension": ".py",
      "clientVersion": "0.25.1",
      "email": "developer@company.com"
    }
  ],
  "period": {
    "startDate": 1710720000000,
    "endDate": 1710892800000
  }
}

Example Request

curl -X POST https://api.cursor.com/teams/daily-usage-data \
  -u YOUR_API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": 1710720000000,
    "endDate": 1710892800000
  }'

Get Spending Data

Retrieve detailed spending information within the current calendar month for team members with search, sorting, and pagination options.

POST /spend

Request Body

ParameterTypeRequiredDescription
searchTermstringNoSearch term to filter results (searches in user names and emails)
sortBystringNoField to sort by. Options: amount, date, user. Default: date
sortDirectionstringNoSort direction. Options: asc, desc. Default: desc
pagenumberNoPage number (1-indexed). Default: 1
pageSizenumberNoNumber of results per page.

Response

{
  teamMemberSpend: {
    spendCents: number;
    fastPremiumRequests: number;
    name: string;
    email: string;
    role: 'owner' | 'member' | 'free-owner';
    hardLimitOverrideDollars: number;
  }[];
  subscriptionCycleStart: number;
  totalMembers: number;
  totalPages: number;
}

Response Fields Explained

FieldDescription
spendCentsTotal spend in cents
fastPremiumRequestsNumber of fast premium model requests
nameTeam member’s name
emailTeam member’s email
roleMember role in the team
hardLimitOverrideDollarsCustom spending limit override in dollars
subscriptionCycleStartStart of current subscription cycle (epoch milliseconds)
totalMembersTotal number of team members
totalPagesTotal number of pages available

Example Response

{
  "teamMemberSpend": [
    {
      "spendCents": 2450,
      "fastPremiumRequests": 1250,
      "name": "Alex",
      "email": "developer@company.com",
      "role": "member",
      "hardLimitOverrideDollars": 100
    },
    {
      "spendCents": 1875,
      "fastPremiumRequests": 980,
      "name": "Sam",
      "email": "admin@company.com",
      "role": "owner",
      "hardLimitOverrideDollars": 0
    },
  ],
  "subscriptionCycleStart": 1708992000000,
  "totalMembers": 15,
  "totalPages": 1
}

Example Requests

Basic spending data with default pagination:

curl -X POST https://api.cursor.com/spend \
  -u YOUR_API_KEY: \
  -H "Content-Type: application/json" \
  -d '{}'

Get spend for a specific user with custom pagination:

curl -X POST https://api.cursor.com/spend \
  -u YOUR_API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerm": "alex@company.com",
    "page": 2,
    "pageSize": 25
  }'