A valid request URL is required to generate request examples{
"ended": 123
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}End an impersonation
Requires customers:impersonate. Ends every support session open on this contact, whoever opened it — an impersonation is a state of the customer’s account rather than a private object of the person who started one, and an owner who could not close a session because somebody else’s name was on it would have a control that fails exactly when it is needed.
Ending is deletion plus the revocation tombstone in one statement, so the JWT already minted from the session stops verifying at the next poll of GET /v1/revocations/{publishable_key} — seconds — rather than at its own five minutes.
Answers 404 when nobody is inside. That is deliberate: a 204 for a session that was not open would fill the audit log with endings that ended nothing. Recorded as contact.impersonation_ended.
A valid request URL is required to generate request examples{
"ended": 123
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Authorizations
A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange. Only a 401 means it is spent; not_a_member (403) is about the organization named in X-Organization-Id and leaves the token good for the others.
Headers
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Path Parameters
Query Parameters
Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.
live, test Response
Ended.
How many support sessions were closed.