Skip to main content

End Staff View (tab closed)

POST 

/api/portal/auth/view-as/end

Sent by the portal tab as a navigator.sendBeacon on page hide, to end a staff "View as buyer" session when its tab closes without Exit. A beacon cannot send an Authorization header, so the view's own token travels in the body (the route is exempt from CSRF). The session ends with reason closed; a reload of the same tab within ~20 seconds resumes it. Anything that is not a live view-as token on this tenant is ignored. Always answers 204. Throttled 30/min.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Request​

Responses​

No Content