JetBrains Account API
You can use the JetBrains Account API to automate the management of licenses and user accounts. It is a REST API with endpoints to:
View, assign, and revoke licenses
Transfer licenses between teams
Create and delete user accounts
API access levels
Your role in the organization determines what you can access through the API:
Org admins have full read and write API access to everything in the organization. They can also enable and disable API access for the entire organization, generate, update, and remove their personal API access token, as well as revoke tokens of other users in the organization.
Team admins have full read and write API access to everything in their team. They can also generate, update, and remove their personal API access token, as well as revoke tokens of other users in their team.
Primary contacts have read-only API access to everything in the organization. They can also generate, update, and remove their personal API access token.
Enable the API
Click the organization name in the bottom left corner of JetBrains Console and select Org administration.
In the API section of the Administration page, click Enable API.
This enables API access for admins and primary contacts. They will be able to generate personal API tokens to access the API.
Disable the API
Click the organization name in the bottom left corner of JetBrains Console and select Org administration.
In the API section of the Administration page, click Disable API.
Disabling the API blocks access to the organization via API methods, but it doesn't invalidate any previously generated tokens. If you enable the API again later, those tokens will still work. For more information, see Token lifetime.
Manage your personal API token
If your role in the organization allows API access, you can generate, regenerate, and remove your personal token as needed.
To use the API, enable it and generate a personal access token. Use the token to authenticate your requests to the API.
Generate a personal token
Click the organization name in the bottom left corner of JetBrains Console and select Org administration.
In the API section of the Administration page, click Generate Token.
Copy the generated token and store it in a safe place, such as a secure password manager. Once you close the dialog with the generated token, you will not be able to see it again.
Regenerate a personal token
Regenerate your personal token if you lose access to it or disclose it to others.
Click the organization name in the bottom left corner of JetBrains Console and select Org administration.
In the API section of the Administration page, click Re-Generate Token.
When a confirmation dialog pops up, click Re-Generate Token again.
Copy the generated token and store it in a safe place, such as a secure password manager. Once you close the dialog with the generated token, you will not be able to see it again.
Remove a personal access token
Remove your personal token if you no longer need access to the API.
Click the organization name in the bottom left corner of JetBrains Console and select Org administration.
In the API section of the Administration page, click Remove Token.
When a confirmation dialog pops up, click Remove Token again.
Revoke other API tokens of other users
As an org or team admin, you can revoke API access tokens generated by other users. For example, if a user compromises their token, you can revoke it immediately instead of waiting for them to remove or regenerate the token. This will invalidate the token and prevent them from accessing the API until they generate a new one.
Click the organization name in the bottom left corner of JetBrains Console and select Org administration.
On the Administration page, scroll down to Users with access to company licenses.
In the table, find the user whose token you want to revoke and click Revoke in the API Token column.
Token lifetime
The JetBrains Account API tokens have an indefinite lifetime.
Each user gets one token, even if they have multiple roles. Unless they regenerate or remove it, the token stays active as long as they keep at least one role. If they lose all roles, the token gets revoked automatically.
If you disable the API and enable it again later, any previously generated tokens will still be valid unless you remove or regenerate them.
Use API methods
See the JetBrains Account API reference for the full list of available methods. To send API requests, you will need the following headers:
X-Customer-CodeYour JetBrains customer ID. You can find it by copying support information.
X-Api-KeyYour personal API token.
>