End the current admin-impersonation session
POST /auth/impersonation/end
POST
/auth/impersonation/end
Revokes the current impersonation session + issues a fresh session for the original admin so the response leaves the caller signed in as themselves. No-op (400) when the current session is not an impersonation.
Audit emits admin.impersonation.ended with subject = target, actor = admin.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Impersonation ended + admin session restored.
object
admin_user_ref
required
The original admin’s ref — confirms who the caller is now signed in as after the rotation.
integer format: int64
admin_username
required
string
Current session is not an impersonation.
object
error
required
Human-readable error summary
string
Example
the request could not be completedAuthentication required, missing, or invalid
object
error
required
Human-readable error summary
string
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}