Last updated Mar 12, 2024

Delete account

This tutorial will help you to:

  • Delete a managed account from Atlassian Administration.
  • Withdraw complete access to all products and services listed in Atlassian Administration.
  • Remove reference to the account from all lists under Directory in Atlassian Administration.

Deleting an account is permanent. If you think you’ll need the account again, we recommend you deactivateit instead.

Delete account API will not:

  • Delete content created by the user.
  • Delete personal data that was input into public content.
  • Delete personal information stored in Marketplace and custom apps installed in products.

Before you permanently delete the account, you’ll have a 14-day grace period, during which the account will appear as temporarily deactivated and can be restored using the Cancel delete account API.

Learn more about delete managed account.

Before you begin

If you’re using SAML SSO, remove the user from your identity provider before you delete their account. If you don’t remove the user from your identity provider, their Atlassian account might get automatically activated again.

If you manage users through Google Suite, remove the users from Google Suite. Contact the support team to request deletion of the users' accounts.

To complete this tutorial, you need the following:

Illustration showing the steps to delete account

Step 1: Get a list of managed accounts

1. Get API key and organization ID

API key is used with the Get managed accounts list script as bearer access token. Organization ID is a required path parameter. These are required to Get Managed Accounts List, Delete account and Cancel delete account.

Screen to copy the API Key and Organization ID

To create an API key and get the Organization ID:

  1. Go to Atlassian Administration. Select your organization if you have more than one.
  2. Select Settings > API keys.
  3. Select Create API key in the top right.
  4. Enter a name that you’ll remember to identify the API key.
  5. By default, the key expires one week from today. If you’d like to change the expiration date, pick a new date under Expires on. You’re unable to select a date longer than a year from the date of creation.
  6. Select Create to save the API key.
  7. Copy the values for your Organization ID and API key. You'll need those to use the API key. Make sure you store these values in a safe place, as we won't show them to you again.
  8. Select Done. The key will appear in your list of API keys.

Learn more about the API keys.

2. Get managed accounts list

  • Use the GET /admin/v1/orgs/{orgId}/users request.
  • Use the API key and orgId from the previous step.
  • Use the API key with Bearer Authentication.
1
2
curl --request GET \ 
--url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/users' \ 
--header 'Authorization: Bearer <api_key>' = \ 
--header 'Accept: application/json'

You can use the account_id fields in the repsonse objects for the following APIs.

Learn more about the Admin API.

Step 2: Delete account

Use the accountId, API key and Organization ID from the previous steps to delete the user account: POST /users/{account_id}/manage/lifecycle/delete.

1
2
curl --request POST \ 
--url 'https://api.atlassian.com/users/{account_id}/manage/lifecycle/delete' \
--header 'Authorization: Bearer <api_key>'
--header 'Content-Type: application/json'

Cancel delete account

If you want to cancel the account deletion within the 14-day grace period, follow Step 1 and use the accountId, API key and Organization ID to cancel account deletion: POST /users/{account_id}/manage/lifecycle/cancel-delete.

1
2
curl --request POST \ 
--url 'https://api.atlassian.com/users/{account_id}/manage/lifecycle/cancel-delete' \
--header 'Authorization: Bearer <api_key>'
--header 'Content-Type: application/json'

Make your first request and get started with the Delete account API and get more information on error codes.

Rate this page: