JetBrains Account API
You can use the JetBrains Account API to manage licenses and user accounts automatically. It's a REST API with endpoints to:
To use the JetBrains Account API, you need a personal access token.
API access by permission
Your permissions in JetBrains Console determine what you can do through the JetBrains Account API and which API settings you can change. To access the API, you'll also need a personal access token. The type of token you use can limit your access as well.
Permission | API access scope | API settings you can change | What you can do through the API |
|---|---|---|---|
Your entire organization |
| ||
Your entire organization | Manage your own tokens | ||
Teams you have access to |
|
* You can invite and delete only users whose email address is on a verified domain of your organization.
Organization and team tokens
Depending on your permissions, you can generate two types of tokens:
An organization token gives you API access to the entire organization. You can have only one such token per organization.
A team token gives you API access only to that team's licenses. You can generate one for each team you have access to. You can't use it to transfer licenses between teams.
For example, if your organization has 10 teams and you have the org-wide Manage licensing and billing permission, you can generate up to 11 tokens: one for the organization and one for each team. Each team token still gives you access only to its own team, even though your permission is org-wide.
Enable or disable the JetBrains Account API
Enabling or disabling the JetBrains Account API turns API access on or off for everyone in your organization, including all its teams.
Enable the JetBrains Account API
Log in to JetBrains Console.
In the sidebar, select Organization | Administration.
In the JetBrains Account API section of the Administration page, click Enable API.
This gives API access to everyone listed in API access by permission.
Disable the JetBrains Account API
Log in to JetBrains Console.
In the sidebar, select Organization | Administration.
In the JetBrains Account API section of the Administration page, click Disable API.
This blocks all API access to your organization. The access tokens users generated stay valid, so they'll work again if you re-enable the API. For more information, see Token lifetime.
Manage your personal access tokens
You can generate or invalidate tokens at any time as long as your permissions give you JetBrains Account API access.
Your token is tied to your account, so any API requests made with it are linked to you. Other users with JetBrains Account API access can generate their own tokens too.
Generate a personal access token
Depending on your permissions, you can generate a token for your entire organization or for a specific team. For the difference between them, see Organization and team tokens.
Log in to JetBrains Console.
In the sidebar, select Organization | Administration.
In the JetBrains Account API section of the Administration page, click Generate access token.
In the dialog that pops up, copy your token. For security reasons, we show the token only once, so save it somewhere safe before you close the dialog.
Log in to JetBrains Console.
In the sidebar, select Licensing | Teams.
On the Teams page, find the team you need and click its name.
In the sidebar, select Administration.
In the JetBrains Account API section of the Administration page, click Generate access token.
In the dialog that pops up, copy your token. For security reasons, we show the token only once, so save it somewhere safe before you close the dialog.
Invalidate your personal access token
Invalidate your token if it's compromised – for example, if you accidentally shared it – or if you no longer need access to the JetBrains Account API. If you have the required permissions, you can also revoke other users' tokens.
Log in to JetBrains Console.
In the sidebar, select Organization | Administration.
In the JetBrains Account API section of the Administration page, click Invalidate token.
In the confirmation dialog, click Invalidate token.
Log in to JetBrains Console.
In the sidebar, select Licensing | Teams.
On the Teams page, find the team you need and click its name.
In the sidebar, select Administration.
In the JetBrains Account API section of the Administration page, click Invalidate token.
In the confirmation dialog, click Invalidate token.
Generate a new personal access token
Generate a new token if you lost yours or it's compromised, but you still need API access. This invalidates your current token, so update any integrations that use the JetBrains Account API with the new one.
Log in to JetBrains Console.
In the sidebar, select Organization | Administration.
In the JetBrains Account API section of the Administration page, click Generate new token.
In the confirmation dialog, click Generate new token.
In the dialog that pops up, copy your token. For security reasons, we show the token only once, so save it somewhere safe before you close the dialog.
Log in to JetBrains Console.
In the sidebar, select Licensing | Teams.
On the Teams page, find the team you need and click its name.
In the sidebar, select Administration.
In the JetBrains Account API section of the Administration page, click Generate new token.
In the confirmation dialog, click Generate new token.
In the dialog that pops up, copy your token. For security reasons, we show the token only once, so save it somewhere safe before you close the dialog.
Revoke another user's token
You can revoke access tokens generated by other users, for example, if someone's token is compromised. To revoke tokens across your organization, you need the Manage licensing and billing permission. Team admins can revoke tokens in the teams they have access to.
Log in to JetBrains Console.
In the sidebar, select Organization | Administration.
In the JetBrains Account API section of the Administration page, scroll down to Access tokens generated by others in your organization.
Each entry shows the user's name and email address, and when they generated the token.
Next to the user whose token you want to revoke, click Revoke.
In the confirmation dialog, click Revoke token.
Log in to JetBrains Console.
In the sidebar, select Licensing | Teams.
On the Teams page, find the team you need and click its name.
In the sidebar, select Administration.
In the JetBrains Account API section of the Administration page, scroll down to Access tokens generated by others in your organization.
Each entry shows the user's name and email address, and when they generated the token.
Next to the user whose token you want to revoke, click Revoke.
In the confirmation dialog, click Revoke token.
Token lifetime
Access tokens for the JetBrains Account API don't expire. Each token stays active until it's invalidated or revoked. If you disable the API and re-enable it later, any previously generated tokens stay valid.
When your permissions change
Your token isn't tied to your permissions. Each API request checks the permissions you have at that moment, so if your permissions change, your token's access changes with them. You don't need to generate a new token.
If you lose your permissions in an organization or team, we’ll revoke your token for it automatically.
Use API methods
For the full list of available methods, see the JetBrains Account API reference. To call the API methods, add two headers to each request:
X-Customer-CodeYour JetBrains customer ID. To find it, open the Help center menu and click Copy support information.
X-Api-KeyYour personal access token.