---
title: "Reinvite an excluded user whose Cognito login was purged"
method: POST
path: "/api/invitations/reinvite/{utilizador_id}"
tags: ["Invitations - Admin"]
---

# Reinvite an excluded user whose Cognito login was purged

`POST /api/invitations/reinvite/{utilizador_id}`

Re-onboards an excluded (ativo=0) user whose Cognito account was hard-deleted by
the dormant-cleanup cron. Creates a fresh Cognito user (sending the setup email),
rewrites the Z_Users + Utilizadores cognito_sub, and reactivates the existing row
— optionally at a new point of sale / role (a rehire may land at a different loja).

The existing row is REUSED (never re-inserted) because cognito_sub /
Z_Users.email / Z_Users.cognitosub are all UNIQUE. Reactivating + relinking
BEFORE first login means auth joins cleanly on the new sub and the fragile
auto-create/claim path is never taken.

Restricted to the company's OWN admin (not system_admin) — same gate as reactivation.

## Path parameters

- `utilizador_id` integer, required

## Headers

- `x-api-token` string, nullable

## Request body

- object

## Response `200`

Successful Response

- object

## 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)
