List tenants the current user can access
GET
/api/v1/tenant/my-tenants
const url = 'http://localhost:3000/api/v1/tenant/my-tenants';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/my-tenants \ --header 'Authorization: Bearer <token>'Returns the user’s organization memberships. Superusers/support see every organization.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ” Media type application/json
object
items
required
Tenants the user can access
Array<object>
object
id
required
Organization ID
string
name
required
Organization name
string
slug
required
Organization slug
string
roleName
Role name (null for superuser/support)
string
accessVia
required
How the user has access: direct membership or via system role
string
isDefault
required
Whether this is the user’s current/default organization
boolean
total
required
Total tenants
number
isSystemView
required
True when items reflect a system-role view (all orgs); false when items only contain memberships
boolean
Example
{ "items": [ { "accessVia": "member" } ]}Forbidden — caller lacks required permission