Skip to content

End a staff member’s read-only view

POST
/auth/impersonation/end
curl --request POST \
--url https://api.sloose.com/auth/impersonation/end \
--header 'Authorization: Bearer <token>'

Ends the session a staff member opened to see this org as one of its members (POST /staff/orgs/{orgId}/impersonate), and writes the end down. The widget’s banner calls this; a view that is not ended runs out on its own after an hour. A session that is not such a view is refused with 409 NOT_IMPERSONATING.

Session only.

Ended.

Media typeapplication/json
object
ok
required
boolean
Example
{
"ok": true
}

The session is unknown or expired (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

An API token was used (code: SESSION_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

This session is nobody’s view of anything (code: NOT_IMPERSONATING).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}