How to change the status of a user using the Jira Align REST API 2

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Issuing a PATCH request to the API endpoint https://<site-url>/rest/align/api/2/Users/<user-id> with the body below:

1 2 3 4 5 6 7 [ { "op": "replace", "path": "/status", "value": "Inactive" } ]

to change the status of a user to Inactivate (i.e. deactivated), results in the status not being changed, although no error was thrown.

Solution

In order to successfully change the status of a user issuing a PATCH request on the endpoint:

https://<site-url>/rest/align/api/2/Users/<user-id>, you need to use the following bodies.

To Activate :

1 2 3 4 5 6 7 [ { "op": "replace", "path": "/isLocked", "value": 0 } ]

To deactivate :

1 2 3 4 5 6 7 [ { "op": "replace", "path": "/isLocked", "value": -1 } ]

For complete documentation, please view the details available in your environment at https://<site-url>/rest/align/api/docs/index.html

Updated on March 20, 2025

Still need help?

The Atlassian Community is here for you.