---
title: "Asks to demote or deactivate an Organization Admin (or steps the key's creator down)."
method: POST
path: "/api/v1/users/{id}/removal-requests"
tags: ["UserRemovalRequests"]
---

# Asks to demote or deactivate an Organization Admin (or steps the key's creator down).

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

## Request

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

Requires `ManageUsers` and an `Idempotency-Key`. The key's creator must be an active
Organization Admin (a System Admin changes roles directly instead) and id an
Organization Admin of the same organization with no other pending request. The target is notified
(in the app and by e-mail) and can approve it (applies at once) or contest it until
`effectiveAt`, 14 days from now; otherwise it is applied shortly after that. When
id is the key's creator, it is their own approval and applies at once (200).
Refused (409) when it would leave the organization with no active Organization Admin. Example:
`POST /api/v1/users/8f0c3c1e-2b6d-4c55-9a51-0d3f3c1b7e21/removal-requests { "action": "Demote", "newRole": "Manager" }`.

## Path parameters

- `id` string, required

## Request body

- CreateAdminRemovalApiRequest: Body of `POST /api/v1/users/{id}/removal-requests`. Examples: `{ "action": "Demote", "newRole": "Manager", "reason": "Moving to the field team" }`, `{ "action": "Deactivate" }`.
  - `action` 'Demote' | 'Deactivate', required: What a removal request does to the Organization Admin.
  - `newRole` 'Manager' | 'User': A role an Organization Admin may be demoted to.
  - `reason` string, nullable: Optional note shown to the admin being removed, up to 500 characters. Example: `"Leaving the company on Friday"`.

## Response `200`

Self-removal: the change was made (`applied: true`).

- 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

- `201`: Requested; `Location` points at the list.
- `400`: Malformed body or missing `Idempotency-Key`.
- `401`: Unauthorized
- `403`: The key's creator may not request this (not an Organization Admin, or a System Admin).
- `404`: No such user in this organization.
- `409`: A request for this admin is already pending, it would remove the last active Organization Admin, or the key's creator is unknown here.
- `422`: The account is not an Organization Admin, `newRole` is missing, or the account is already inactive.
- `429`: Too Many Requests
- `502`: The sync server answered with an unexpected error.
- `503`: This server cannot reach the sync server; nothing was requested.

---

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