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

# /impersonate/extend - Extend the impersonation session

> POST /impersonate/extend
> 
> Restarts the current impersonation session for a full `IMPERSONATION_SESSION_DURATION` (default 1 hour)
> from now, with no limit on the number of extensions. Called with the impersonation token: the response
> carries a new token for the same session, and the presented one is revoked. The impersonator must still
> hold `impersonate:users` and the target must still be an active user without the Owner role. API keys
> are refused. The extension is recorded in the session audit as `session_extended`.



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


## Authentication methods
- Bearer auth


## Parameters




## Responses
### 200
Impersonation extended successfully

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

- **message** (string)

- **data** (object)


### 400
Not impersonating, the session expired or ended, or the target is no longer active

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


### 403
The impersonator lost impersonate:users, the target now has the Owner role, or the caller used an API key

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

- **message** (string)
  Error message

- **data** (object)



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