Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

API for rotating API Tokens and checking expiration date

Victor La
August 26, 2026

Since API tokens have a maximum lifetime of 365 days, we’d like to incorporate token rotation into our credential-rotation process and renew tokens before they expire.

Is there an API available to rotate these API tokens programmatically?

Additionally, for reporting and monitoring purposes, is there an API or other method to retrieve a token’s expiration date? Tokens may be created by different users, including service accounts, and we may not know their creation dates, making it difficult to determine when they will expire.

1 answer

1 vote
Arkadiusz Wroblewski
Community Champion
August 26, 2026

Hello @Victor La 

List/Read API Tokens Definitely so Retrieve Expiration date should be doable.

curl --request GET \ --url 'https://api.atlassian.com/admin/api-access/v1/orgs/{orgId}/api-tokens' \

image.png

Rotate - I don´t think so at the moment.

The API Access REST API

Best,

Arek🤠

Victor La
August 26, 2026

@Arkadiusz Wroblewski, thank you for getting back to me! I have a follow up question.

Based on the documentation, it looks like this endpoint requires an organization-level API key rather than an API token? I assume there isn't a way with the API token?

Trudy P Claspill
Community Champion
August 26, 2026

Hello @Victor La 

In this case "key" and "token" are essentially the same thing. The difference is that the process needs Organization Admin level access to see all the API token names and expiration dates across all accounts in the Organization. The only way to get a "token" that has Organization Admin level access is to generate it from the Admin Hub > Organization Settings > API Keys. That can be done only by an Organization Admin.

Screenshot 2026-08-26 at 6.07.14 PM.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events