Get my tenant switch history
GET
/api/v1/tenant/switch/history
const url = 'http://localhost:3000/api/v1/tenant/switch/history';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 \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” limit
number
offset
number
Responses
Section titled “ Responses ” Media type application/json
object
items
required
List of tenant switches
Array<object>
object
id
required
Switch record ID
string
userId
required
User ID who performed the switch
string
fromOrgId
Original organization ID
string
fromOrgName
Original organization name
string
toOrgId
required
Target organization ID
string
toOrgName
Target organization name
string
duration
Duration of the switch
string
reason
Reason for switching
string
switchedAt
required
When the switch was performed
string format: date-time
expiresAt
When the switch expires
string format: date-time
returnedAt
When the user returned to default tenant
string format: date-time
isActive
required
Whether the switch is currently active
boolean
total
required
Total count
number
hasMore
required
Whether there are more items
boolean
Example generated
{ "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}Forbidden — caller lacks required permission