Programmatic access to usage metrics across an organization
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 Enterprise SaaS (console.tabnine.com) and Private Installations.
The APIs return JSON with parameter details and example responses.
OpenAPI reference
Organization
Get current organization ID and high-level settings
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
Successful response with organization structure.
application/json
publicKeystringOptional
Public key in PEM format.
samlEnabledbooleanOptional
smtpConfiguredbooleanOptional
usernamePasswordEnabledbooleanOptional
namestringRequired
domainsstring[]Optional
planTypestringOptional
idstringRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/organization
Get list of teams for the given organization
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
offsetintegerOptional
Skips a number of items before starting to return results.
Default: 0
limitintegerOptional
Maximum number of items to return.
Default: 0
Responses
200
Successful response with list of teams.
application/json
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/organization/teams
Get account utilization info (monthly)
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
startDatestringOptional
Start date for showing utilization (YYYY-MM).
Default: last 12 months.
Example: 2025-01Pattern: ^\d{4}-\d{2}$
Responses
200
Successful response with monthly utilization array.
application/json
yearinteger · min: 1970Required
monthinteger · max: 11Required
Zero-based month (0=January, 11=December).
registeredintegerRequired
deactivatedintegerRequired
activeintegerRequired
pendingintegerRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/organization/account-utilizations
Get organization-level usage
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
organizationIdstringRequired
The unique identifier of the organization
fromstring · date-timeRequired
Filter usage data from this date (ISO 8601).
tostring · date-timeRequired
Filter usage data until this date (ISO 8601).
granularitystring · enumRequired
Time resolution at which usage data is aggregated and returned.
Possible values:
Responses
200
Successful response with organization usage data.
application/json
organizationIdstringRequired
fromstring · date-timeRequired
tostring · date-timeRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/organization/usage
Get users who are not assigned to a team
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
offsetintegerRequired
Skips a number of items before starting to return results.
limitintegerRequired
Maximum number of items to return.
teamMemberbooleanRequired
Use false for users not assigned to a team.
Example: false
activebooleanRequired
Use true for registered users (false for deactivated users).
Example: true
Responses
200
Successful response with users.
application/json
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/organization/users
License & permissions
Get license info
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
Successful response with license info.
application/json
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/license
Get account permissions info (list of account admins)
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
rolestringRequiredExample: Admin
Responses
200
Successful response with users for the given role.
application/json
usernamestringRequired
organizationIdstringRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/instance/permissions
Team-level
Get users of a given team
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
teamIdstringRequired
Query parameters
offsetintegerRequired
Skips a number of items before starting to return results.
limitintegerRequired
Maximum number of items to return.
Responses
200
Successful response with users for the team.
application/json
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/team/{teamId}/users
Get current team utilization info
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
teamIdstringRequired
Responses
200
Successful response with team utilization counts.
application/json
registeredintegerRequired
deactivatedintegerRequired
invitedintegerRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/team/account-utilizations
Get team name
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
teamIdstringRequired
Responses
200
Successful response with team info.
application/json
idstringRequired
namestringRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/team/{teamId}
Team-level usage
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
organizationIdstringRequired
teamIdstringRequired
fromstring · date-timeRequired
Filter usage data from this date (ISO 8601).
tostring · date-timeRequired
Filter usage data until this date (ISO 8601).
granularitystring · enumRequired
Time resolution at which usage data is aggregated and returned.
Possible values:
Responses
200
Successful response with team usage data.
application/json
organizationIdstringRequired
teamIdstringRequired
fromstring · date-timeRequired
tostring · date-timeRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
403
Forbidden – User lacks permission.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/team/usage
User-level
User-level info
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
user_idstringRequired
Responses
200
Successful response with user info.
application/json
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
403
Forbidden – User lacks permission.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/user/{user_id}
User-level usage
GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
organizationIdstringRequired
userIdstringRequired
fromstring · date-timeRequired
Filter usage data from this date (ISO 8601).
tostring · date-timeRequired
Filter usage data until this date (ISO 8601).
granularitystring · enumRequired
Time resolution at which usage data is aggregated and returned.
Possible values:
Responses
200
Successful response with user usage data.
application/json
organizationIdstringRequired
userIdstringRequired
fromstring · date-timeRequired
tostring · date-timeRequired
400
Bad Request – Invalid or missing parameters.
401
Unauthorized – Invalid token.
403
Forbidden – User lacks permission.
404
Not Found – Resource not found.
500
Internal Server Error – Unexpected server error.
GET
/api/v1/user/usage
API Categories
The Usage API can retrieve the following information:
Organization & Teams
Get organization and team IDs
List organization teams
List users from each team
Usage Metrics
Active users
Account utilization
Productivity factor
Automation factor
Usage volumes for:
Code Completions
Chat Interactions
List of Implemented APIs
APIs return JSON with parameter details and example responses:
Organization-Level Info APIs and Usage APIs
Get current organization ID and high-level settings