---
title: "Assign PILOT role to FLIGHT_MANAGER user"
method: POST
path: "/orgmng/users/assign-pilot-role"
tags: ["User Management"]
---

# Assign PILOT role to FLIGHT_MANAGER user

`POST /orgmng/users/assign-pilot-role`

## Request

- Base URL: `http://localhost:8486`
- URL: `http://localhost:8486/orgmng/users/assign-pilot-role`
- Auth: API key in header `x-auth-token`

Assigns PILOT role and creates Pilot entity for a FLIGHT_MANAGER user. Users with 'assign_pilot:flight_manager' permission can only assign to themselves. Users with 'assign_pilot:flight_manager:all' permission can assign to any user.

## Request body

- AssignPilotRoleDTO: Data for assigning pilot role
  - `airdodgeUserId` integer, required
  - `pilotRegistrationNumber` string, required
  - `pilotEligibilityConfirmed` boolean, required

## Response `200`

Pilot role assigned successfully

## Other responses

- `400`: Invalid input
- `403`: Access denied
- `404`: User not found
- `409`: User already has PILOT role or pilot registration number already exists
- `500`: Internal server error

---

[API](https://skmtc.dev/airdodge/apis/api-core.md) - [All operations](https://skmtc.dev/airdodge/apis/api-core/llms.txt) - [OpenAPI document](https://skmtc.dev/airdodge/apis/api-core/revisions/fb3c5a1055cc?raw)
