This tutorial will help you to:
Deleting an account is permanent. If you think you’ll need the account again, we recommend you deactivateit instead.
Delete account API will not:
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.
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:
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.
To create an API key and get the Organization ID:
Learn more about the API keys.
/admin/v1/orgs/{orgId}/users
request.1 2curl --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.
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 2curl --request POST \ --url 'https://api.atlassian.com/users/{account_id}/manage/lifecycle/delete' \ --header 'Authorization: Bearer <api_key>' --header 'Content-Type: application/json'
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 2curl --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: