Access Denied: Enterprise Team Membership Required for API Usage

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

I am the team admin, but I cannot use this API.

Steps to Reproduce

curl --location ‘https://api.cursor.com/analytics/ai-code/commits?startDate=1d&endDate=now&page=1&pageSize=10’ \
–header ‘Authorization: Bearer key_xxx’

{“code”:“error”,“message”:“You must be a member of an enterprise team to access this resource”}

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

版本: 1.6.45
提交: 1.99.3
日期: 3ccce8f55d8cca49f6d28b491a844c699b8719a0
Electron: 2025-09-22T18:22:38.013Z
ElectronBuildId: 34.5.8
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.1
OS: 13.2.152.41-electron.0

Thanks for reporting this! Are you part of an enterprise team? If not, the error message is actually working as intended.

The /analytics/ai-code/commits endpoint is part of the AI Code Tracking API, which is exclusive to Enterprise plans.

  1. If you need AI Code Tracking analytics:

  2. Alternative: If you’re looking for general usage analytics, the Admin API (available on Business plans) provides team metrics and usage data at /api/v1/analytics. Check the Admin API docs for available endpoints.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.