---
title: "The admin being removed agrees: the change is made now."
method: POST
path: "/api/v1/users/{id}/removal-requests/{requestId}/approve"
tags: ["UserRemovalRequests"]
---

# The admin being removed agrees: the change is made now.

`POST /api/v1/users/{id}/removal-requests/{requestId}/approve`

## Request

- Base URL: `https://app.flexonthejob.com`
- URL: `https://app.flexonthejob.com/api/v1/users/{id}/removal-requests/{requestId}/approve`
- Auth: HTTP bearer

Requires `ManageUsers` and an `Idempotency-Key`; no body. Only the admin named in the
request (the key's creator must be them) can approve, at any time while it is `Pending` -
also after `effectiveAt` if it has not been applied yet. Refused (409) once closed, or when it
would remove the last active Organization Admin (the request then closes as `Cancelled`). Example:
`POST /api/v1/users/8f0c3c1e-2b6d-4c55-9a51-0d3f3c1b7e21/removal-requests/12/approve`.

## Path parameters

- `id` string, required
- `requestId` integer, required

## Response `200`

Approved and applied.

- AdminRemovalOutcomeDto: Answer of the removal-request writes: the request after the call, and whether the change was made by it.
  - `request` AdminRemovalRequestDto: A request to demote or deactivate an Organization Admin. Removing one needs the admin's own approval or a 14-day notice period during which they can contest it.
    - `id` integer: Request id. Example: `12`.
    - `targetUserId` string: User id (string GUID) of the Organization Admin being removed. Example: `"8f0c3c1e-2b6d-4c55-9a51-0d3f3c1b7e21"`.
    - `targetEmail` string: E-mail of the admin being removed. Example: `"pat@example.com"`.
    - `targetName` string, nullable: Display name of the admin being removed, when recorded. Example: `"Pat Lee"`.
    - `requestedByUserId` string: User id (string GUID) of the Organization Admin who asked; the same as `targetUserId` for a self-removal.
    - `requestedByEmail` string: E-mail of the admin who asked. Example: `"sam@example.com"`.
    - `requestedByName` string, nullable: Display name of the admin who asked, when recorded. Example: `"Sam Carter"`.
    - `action` 'Demote' | 'Deactivate': What a removal request does to the Organization Admin.
    - `newRole` string, nullable: For `Demote`: `Manager` or `User`; null for `Deactivate`.
    - `reason` string, nullable: The requester's optional note (up to 500 characters). Example: `"Leaving the company on Friday"`.
    - `status` 'Pending' | 'Approved' | 'Contested' | 'Cancelled' | 'Applied': Where a removal request stands. Only `Pending` is open.
    - `createdAt` string, date-time: When it was requested (ISO-8601 UTC). Example: `"2026-09-23T14:05:00Z"`.
    - `effectiveAt` string, date-time: End of the notice period (ISO-8601 UTC, `createdAt` + 14 days; equal to `createdAt` for a self-removal): the target can contest until then, and it is applied shortly after. Example: `"2026-10-07T14:05:00Z"`.
    - `daysRemaining` integer: Whole days left until `effectiveAt`, rounded up; 0 once it has passed or the request is closed. Example: `14`.
    - `resolvedAt` string, date-time, nullable: When the request closed (ISO-8601 UTC); null while `Pending`.
    - `resolvedByEmail` string, nullable: E-mail of whoever closed it; null when the notice period ran out or it lapsed.
    - `resolutionNote` string, nullable: Why a request lapsed or was superseded. Example: `"The requester is no longer an active Organization Admin."`
  - `applied` boolean: True when this call demoted / deactivated the account (approval or self-removal).
  - `message` string: What happened. Example: `"Removal requested: pat@example.com will be demoted to Manager on 2026-10-07 (UTC) unless they contest it, or sooner if they approve."`

## Other responses

- `400`: Missing `Idempotency-Key`.
- `401`: Unauthorized
- `403`: The key's creator is not the admin named in the request.
- `404`: No such request for this user in this organization.
- `409`: The request is no longer pending, the change can no longer apply, or the key's creator is unknown here.
- `429`: Too Many Requests
- `502`: The sync server answered with an unexpected error.
- `503`: This server cannot reach the sync server; nothing changed.

---

[API](https://skmtc.dev/flexonthejob/apis/flex-api.md) · [All operations](https://skmtc.dev/flexonthejob/apis/flex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flexonthejob/apis/flex-api/revisions/19c8f4d27acf?raw)
