> For the complete documentation index, see [llms.txt](https://api.my.nethesis.it/llms.txt)

# /impersonate - Start impersonation (permission-based access)

> POST /impersonate
> 
> Allows users with the `impersonate:users` permission (Staff and Owner roles, Owner organization only)
> to impersonate another active user, without the target's consent. An Owner-role account is never a
> target. The token expires after the `IMPERSONATION_SESSION_DURATION` of the backend (default 1 hour),
> and every session is audited.



## Servers
- Backend API server: https://my.nethesis.it/backend/api (Backend API server)


## Authentication methods
- Bearer auth


## Parameters



### Body: application/json (object)

- **user_id** (string)
  Logto ID of the user to impersonate



## Responses
### 200
Impersonation started successfully

#### Body: application/json (object)
- **code** (integer)

- **message** (string)

- **data** (object)


### 400
Bad request (cannot impersonate yourself, user not found, etc.)

#### Body: application/json (object)
- **code** (integer)
  HTTP error code

- **message** (string)
  Error message

- **data** (object)


### 403
Forbidden (insufficient permissions for impersonation, or already impersonating)

#### Body: application/json (object)
- **code** (integer)
  HTTP error code

- **message** (string)
  Error message

- **data** (object)


### 401
Unauthorized - invalid or missing token

#### Body: application/json (object)
- **code** (integer)

- **message** (string)

- **data** (object | null)



[Powered by Bump.sh](https://bump.sh)
