--- title: "POST | Deactivate user group" slug: "api-v2-post-deactivate-user-group" updated: 2026-09-29T16:15:22Z published: 2026-09-29T16:15:22Z canonical: "docs.senhasegura.io/api-v2-post-deactivate-user-group" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.senhasegura.io/llms.txt > Use this file to discover all available pages before exploring further. # POST | Deactivate user group ## Description Deactivate a user group. All memberships of the group are removed with it, and the group stays registered on the platform as inactive. While the group is inactive, [PUT | Update user group](/v4-2/docs/api-v2-put-update-user-group), [PATCH | Partially update user group](/v4-2/docs/api-v2-patch-update-user-group), and member changes return `409` `api.resource.inactive`. Deactivation is a dedicated action rather than a field, so the `active` state cannot be changed through [PUT | Update user group](/v4-2/docs/api-v2-put-update-user-group) or [PATCH | Partially update user group](/v4-2/docs/api-v2-patch-update-user-group). Deleting a group has the same effect on the group and its memberships. For more information, access [DELETE | Delete user group](/v4-2/docs/api-v2-delete-user-group). --- ## Prerequisites - An application with the **Users** authorization granted by the administrator in A2A. For more information, access [How to manage authorizations in A2A](/v4-2/docs/api-v2-how-to-manage-authorizations-in-a2a). - A valid OAuth 2.0 access token. For more information, access [How to authenticate an application in A2A](/v4-2/docs/how-to-authenticate-an-application-in-a2a). --- ## Request `POST` `/api/v2/iam/user-groups/{id}/deactivate` This action takes no request body. ### Path parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | Yes | Unique identification code of the user group. | --- ### Example request `POST` `{{url}}/api/v2/iam/user-groups/7/deactivate` --- ## Response ``` HTTP/1.1 204 No Content X-Request-Id: 7f3c1a90-2c4e-4b1a-9f5e-0a2b7c9d1e34 ``` A successful deactivation returns no body. To confirm the new state, access [GET | List a user group](/v4-2/docs/api-v2-get-list-a-user-group). Attention Deactivating a group removes all of its memberships. The users keep their accounts, but they lose the access that this group granted them. [POST | Activate user group](/v4-2/docs/api-v2-post-activate-user-group) does not restore the memberships, so record the members before you deactivate the group. For the current list, access [GET | List all members of a user group](/v4-2/docs/api-v2-get-list-user-group-members). --- ## Errors | HTTP code | Message | Possible cause | Solution | | --- | --- | --- | --- | | `401` | `api.auth.unauthorized` | The access token is missing, invalid, or has expired. | Request a new access token. | | `404` | `api.resource.not_found` | The user group does not exist, or it is outside the scope of the authorization. | Check the identification code and the authorization scope. | | `409` | `api.resource.conflict.already_inactive` | The user group is already inactive. | No action is required. | | `429` | `api.rate_limit_exceeded` | The request rate limit was exceeded. | Wait the number of seconds returned in the `Retry-After` header and try again. | For authentication error messages and the `403` versus `404` policy, access [API v2 - Conventions and shared behaviors](/v4-2/docs/api-v2-conventions-and-shared-behaviors).