Terminate impersonation session
POST/tenants/{tenant_id}/impersonations/{id}/terminate
Immediately ends an active impersonation session, revoking the admin's access to the tenant workspace. The termination is recorded with timestamp and admin ID for audit. Use when a support session is no longer needed or if unauthorised access is suspected.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant_id | string | Yes | The tenant identifier. |
id | string | Yes | The impersonation session ID to terminate. |
Request body
Content type application/json.
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Optional reason for early termination. Max length: 500 |
Example
{
"reason": "Issue resolved. Ending session proactively."
}
Responses
200 Impersonation session terminated
404 Session not found
409 Session is already terminated or was never active
Example request
Paths are relative to the control-plane API base URL ($BASE_URL below).
curl -X POST "$BASE_URL/tenants/{tenant_id}/impersonations/{id}/terminate" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"reason": "Issue resolved. Ending session proactively."}'