---
title: "Set all permissions for a user"
method: PUT
path: "/api/users/{user_id}/permissions"
tags: ["Permissions"]
---

# Set all permissions for a user

`PUT /api/users/{user_id}/permissions`

Replace all user-level permissions for a user with the given list.

This is the console's "Gerir Permissões" save, and it is a SET-REPLACE that
re-submits everything the user already holds. That is why the bar is on the
DELTA (`app/db/permissions.py`): under the old per-id refusal, a user who
already carried `admin` could never be saved again — every save re-sent that
id and every save was 403'd, including saves that only added an ordinary
permission.

## Path parameters

- `user_id` integer, required

## Headers

- `x-api-token` string, nullable

## Request body

- PermissionsBulkAssign
  - `permission_ids` integer[], required
  - `grant_privileged_role` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
