The Usage API (released with 5.18.0) provides programmatic access to usage metrics across an organization. It complements existing enterprise reporting optionsβUI-based usage reports and CSV exportsβby enabling integration into internal dashboards and tools via API.
The Usage API is available to all Enterprise customers on both SaaS (console.tabnine.com) and Private installations.
The APIs return JSON with parameter details and example responses.
Enabling Usage API
Only users with Admin access to Tabnine can access the Usage API. This is done by navigating to Settings , then Access Tokens .
Navigate to the top righthand corner and click Generate token .
A new Generate New Token window.
Type in the Token Description, then press the blue Generate Token button.
You can only access this token at this point. Once you hit Close , you will no longer be able to access this particular token.
If you need to access a new token, you can generate a new token. If the token you intended to use was lost (for example, copied and next pasted), you should revoke that token by hitting ποΈ Revoke .
API Categories
The Usage API can retrieve the following information:
Organization & Teams
Get organization and team IDs
List users from each team
List of Implemented APIs
APIs return JSON with parameter details and example responses:
Organizational Level Info APIs and Usage APIs
Get current organization ID and high-level settings
Get list of teams for given organization
Get account utilization info
Get account permissions info
Get organization-level usage
Team Level Info APIs
Get users of a given team
Get users that aren't assigned to a team
Get current utilization info
Organization-Level APIs
1. Org ID & High-Level Settings 2. List of Teams 3. License Info 4. Acct Utilization Info 5. Account Permissions Info 6. Organization Level Usage
Get current organization ID and high-level settings
Endpoint:
Copy GET /api/v1/organization
Parameters:
Parameter
Type
Required?
Description
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIICIXXXXXXAAQ==\n-----END PUBLIC KEY-----\n",
"samlEnabled": false,
"smtpConfigured": true,
"usernamePasswordEnabled": true,
"name": "Yagel",
"domains": [
"tabnine.com"
],
"planType": "Enterprise",
"id": "9a3895ca-1c27-4231-8978-85ae00267d02"
}
Get list of teams for a given organization
Endpoint:
Copy GET /api/v1/organization/teams/?offset=0&limit=0
Parameters:
string
(non-negative integer)
Specifies the maximum number of items to return. (Example : limit=10
returns only 10 items)
Skips a number of items before starting to return results.(Example : offset=20
skips the first 20 items and starts from item 21)
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"data": [
{
"id": "XXXXXXXXXXXXX",
"name": "FE team",
"usersCount": 6,
"isDefaultTeam": false
},
{
"id": "YYYYYYYYYYYY",
"name": "Default Team",
"usersCount": 0,
"isDefaultTeam": true
},
{
"id": "ZZZZZZZZZZZZZZ",
"name": "QA Team",
"usersCount": 2,
"isDefaultTeam": false
},
{
"id": "MMMMMMMMMMMMMMMMM",
"name": "Backend team",
"usersCount": 5,
"isDefaultTeam": false
}
],
"meta": {
"count": 4,
"total": 4
}
}
Notes:
Get License Info
Endpoint:
Parameters:
Parameter
Type
Required?
Description
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"license": {
"exp": 1895529600,
"seats": 2000,
"seatsCap": 22000,
"audience": "idp-new",
"features": [
"chat",
"chat_models",
"local_retrieval",
"remote_indexing",
"jira_integration"
],
"settings": {
"chatModel": {
"type": "Private"
}
},
"iat": 1735806729
}
}
exp
β the expiration date of the license and is in UNIX timestamp format
iat
β βissued atβ is the timestamp where the license was created
Get Account Utilization Info
Endpoint:
Copy GET /api/v1/organization/account-utilizations?startDate=2025-01
Parameters:
β¨
(default: last 12 months)
Start date for showing utilization: Will only show up to the last 12 months
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy [
{
"year": 2025,
"month": 0,
"registered": 0,
"deactivated": 0,
"active": 0,
"pending": 0
},
{
"year": 2025,
"month": 1,
"registered": 0,
"deactivated": 0,
"active": 0,
"pending": 0
},
{
"year": 2025,
"month": 2,
"registered": 13,
"deactivated": 0,
"active": 13,
"pending": 4
},
{
"year": 2025,
"month": 3,
"registered": 13,
"deactivated": 1,
"active": 14,
"pending": 4
}
]
Notes:
Get Account Permissions Info
Endpoint:
Copy GET /api/v1/instance/permissions?role=Admin
Parameters:
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy [
{
"username": "admin@tabnine.com",
"organizationId": "9a3895ca-1c27-4231-8978-85ae00267d02"
}
]
Get Organization-Level Usage
Endpoint:
Copy GET /api/v1/organization/usage?organizationId={org-id}&from=2025-03-01T00:00:00Z&to=2025-04-03T00:00:00Z&granularity=all
Parameters:
The unique identifier of the organization
Filter usage data from this date
Filter usage data until this date
Determines the time resolution at which usage data is aggregated and returned.
Options: all, daily, weekly, monthly
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Responses (JSON):
Granularity: All
Copy {
"organizationId": "9a3895ca-1c27-4231-8978-85ae00267d02",
"from": "2025-03-15T00:00:00Z",
"to": "2025-05-12T00:00:00Z",
"usage": {
"granularity": "all",
"data": [
{
"from": "2001-01-01T00:00:00Z",
"to": "3000-12-31T00:00:00Z",
"activeUsers": 16,
"productivityFactor": 0.8993358965396715,
"codeCompletions": {
"activeUsers": 12,
"completions": 206,
"charsCompleted": 42884,
"keystrokes": 3706,
"lines": 1521,
"automationFactor": 0.32314923619271446
},
"chat": {
"activeUsers": 13,
"interactions": 118,
"usefulChatInteractions": 48,
"lines": 326,
"charsCompleted": 9742,
"chatConsumptionRate": 0.4067796610169492
}
}
]
}
}
Granularity: Monthly
Copy {
"organizationId": "9a3895ca-1c27-4231-8978-85ae00267d02",
"from": "2025-03-15T00:00:00Z",
"to": "2025-05-12T00:00:00Z",
"usage": {
"granularity": "monthly",
"data": [
{
"from": "2025-03-01T00:00:00Z",
"to": "2025-03-31T00:00:00Z",
"activeUsers": 8,
"productivityFactor": 0.8684931506849315,
"codeCompletions": {
"activeUsers": 9,
"completions": 146,
"charsCompleted": 6658,
"keystrokes": 1782,
"lines": 231,
"automationFactor": 0.3951074870274277
},
"chat": {
"activeUsers": 6,
"interactions": 70,
"usefulChatInteractions": 24,
"lines": 172,
"charsCompleted": 4856,
"chatConsumptionRate": 0.34285714285714286
}
},
{
"from": "2025-04-01T00:00:00Z",
"to": "2025-04-30T00:00:00Z",
"activeUsers": 9,
"productivityFactor": 1,
"codeCompletions": {
"activeUsers": 4,
"completions": 60,
"charsCompleted": 36226,
"keystrokes": 1924,
"lines": 1290,
"automationFactor": 0
},
"chat": {
"activeUsers": 7,
"interactions": 48,
"usefulChatInteractions": 24,
"lines": 154,
"charsCompleted": 4886,
"chatConsumptionRate": 0.5
}
}
]
}
}
Team-Level APIs
1. Team Users 2. Unassigned Users 3. Utilization Info 4. Team Name 5. Team Level Usage
Get Users for a Given Team
This returns all registered and deactivated users from a team.
Endpoint:
Copy GET api/v1/team/{:teamId}/users?offset=0&limit=0
Parameters:
string
(non-negative integer)
Specifies the maximum number of items to return. (Example : limit=10
returns only 10 items)
Skips a number of items before starting to return results.(Example : offset=20
skips the first 20 items and starts from item 21)
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"data": [
{
"id": "xxxxxxxxxxxxxxxxxx",
"username": "Taylor",
"email": "taylor@demo.com",
"role": "Admin",
"verified": true
},
{
"id": "yyyyyyyyyyyyyyy",
"username": "Matt",
"email": "matt@demo.com",
"role": "Manager",
"verified": true
},
{
"id": "ZZZZZZZZZZZZZZZZZZZZ",
"username": "Ben",
"email": "ben@demo.com",
"role": "Member",
"verified": true
}
],
"meta": {
"count": 3,
"total": 3,
"next": {
"limit": 0,
"offset": 0
}
}
}
Get Users Who Aren't Assigned to a Team
Endpoint:
Copy GET /api/v1/organization/users?offset=0&limit=0&teamMember=false&active=true
Parameters:
string
(non-negative integer)
Specifies the maximum number of items to return. (Example : limit=10
returns only 10 items)
Skips a number of items before starting to return results.(Example : offset=20
skips the first 20 items and starts from item 21)
false
for users who are not assigned to a team
true
, for users who are registered (false for deactivated user
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"data": [
{
"id": "eec77331-89ac-45ff-93fa-31b1df99aaa6",
"username": "ben@example.com",
"email": "ben@example.com",
"verified": true,
"role": "Manager",
"deactivatedAt": null,
"updatedAt": "2025-04-10T06:53:09.562Z"
}
],
"meta": {
"count": 1,
"total": 1
}
}
Get Current Team Utilization Info
Endpoint:
Copy GET /api/v1/team/account-utilizations?teamId={teamId}
Parameters:
The unique identifier of the team
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"registered": 5,
"deactivated": 1,
"invited": 1
}
Get Team Name
Endpoint:
Copy GET /api/v1/team/{team-id}
Parameters:
Parameter
Type
Required?
Description
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Copy {
"id": "4e69f465-6f02-4e33-bfe3-9d10a1d20db9",
"name": "Backend team"
}
Team Level Usage API
Endpoint:
Copy GET /api/v1/team/usage?organizationId={org-id}&teamId={team-id}&from=2025-03-15T00:00:00Z&to=2025-04-15T00:00:00Z&granularity=all
Parameters:
The unique identifier of the organization
The unique identifier of the team
Filter usage data from this date
Filter usage data until this date
Determines the time resolution at which usage data is aggregated and returned.
Options: all
, daily
, weekly
, monthly
Response Codes:
200 OK
β Successful response with usage data
400 Bad Request
β Invalid or missing parameters
401 Unauthorized
β Invalid token
403 Forbidden
β User does not have permission to access this team's data
404 Not Found
β Organization or team not found
500 Internal Server Error
β Unexpected server error
Response (JSON):
Granularity: All
Copy {
"organizationId": "9a3895ca-1c27-4231-8978-85ae00267d02",
"teamId": "7f7fd28f-dae0-4955-9e40-c4a314513657",
"from": "2025-03-15T00:00:00Z",
"to": "2025-05-15T00:00:00Z",
"usage": {
"granularity": "all",
"data": [
{
"from": "2001-01-01T00:00:00Z",
"to": "3000-12-31T00:00:00Z",
"activeUsers": 4,
"productivityFactor": 1,
"codeCompletions": {
"activeUsers": 2,
"completions": 13,
"charsCompleted": 1576,
"keystrokes": 161,
"lines": 40,
"automationFactor": 0
},
"chat": {
"activeUsers": 3,
"interactions": 16,
"usefulChatInteractions": 6,
"lines": 53,
"charsCompleted": 1899,
"chatConsumptionRate": 0.375
}
}
]
}
}