---
title: "Assigns or unassigns users to/from an absence region."
method: POST
path: "/absenceregions/users/assign"
tags: ["absenceRegions"]
---

# Assigns or unassigns users to/from an absence region.

`POST /absenceregions/users/assign`

A user can be assigned to only one absence region.
            If a user is already assigned to an absence region, they will be removed from the previous one and assigned to the new one.
            Providing an empty list of user ids will remove all users from the absence region.

<Check title="Required Permissions" icon="key">The user must be an admin or have `user-planning-data:write` permissions.</Check>

## Headers

- `Authorization` string, required

## Request body

- AssignUsersToAbsenceRegionForm
  - `userIds` string[], required — The list of userIds to assign to that region. Providing an empty list of user ids will remove all users from the absence region.
  - `regionId` string, uuid, required — The id of the region to assign the users to.

## Response `204`

No Content

- object

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
