Get my tenant switch history
const url = 'http://localhost:3000/api/v1/tenant/switch/history?limit=20&offset=0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/v1/tenant/switch/history?limit=20&offset=0' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Maximum number of switches to return
Number of switches to skip
Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Responses
Section titled “Responses”object
List of tenant switches
object
Switch record ID
User ID who performed the switch
Original organization ID
Original organization name
Target organization ID
Target organization name
Duration of the switch
Reason for switching
When the switch was performed
When the switch expires
When the user returned to default tenant
Whether the switch is currently active
Total count
Whether there are more items
Examplegenerated
{ "items": [ { "id": "example", "userId": "example", "fromOrgId": "example", "fromOrgName": "example", "toOrgId": "example", "toOrgName": "example", "duration": "example", "reason": "example", "switchedAt": "2026-04-15T12:00:00Z", "expiresAt": "2026-04-15T12:00:00Z", "returnedAt": "2026-04-15T12:00:00Z", "isActive": true } ], "total": 1, "hasMore": true}Invalid limit or offset
Forbidden — caller lacks required permission