# /impersonate/consent - Enable impersonation consent **POST /impersonate/consent** Allows a user to enable consent for being impersonated by authorized users (Super Admin role or Owner organization users). This is a **privacy-friendly** approach where users explicitly control if and for how long they can be impersonated. **Key Features:** - User controls their own impersonation consent - Custom duration (1-168 hours) - Only active while consent is valid - Complete audit trail of all impersonation activities ## Servers - Backend API server (port 8080): https://api.your-domain.com/api (Backend API server (port 8080)) - Collect API server (port 8081): https://collect.your-domain.com/api (Collect API server (port 8081)) ## Authentication methods - Bearer auth ## Parameters ## Body parameters Content-type: application/json - **duration_hours** (integer) How many hours the consent should be active (max 1 week, defaults to 1 hour) ## Responses ### 200: Impersonation consent enabled successfully #### Body Parameters: application/json (object) - **code** (integer) - **message** (string) - **data** (object) ### 400: Bad request (invalid duration) #### Body Parameters: application/json (object) - **code** (integer) HTTP error code - **message** (string) Error message - **data** (object) ### 401: Unauthorized - invalid or missing token #### Body Parameters: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) [Powered by Bump.sh](https://bump.sh)