Skip to content

List tenants the current user can access

GET
/api/v1/tenant/my-tenants
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.

x-organization-id
string format: uuid

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.

Media typeapplication/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
Allowed values: member system
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. The caller lacks the permission, or is an API key (API keys cannot use tenant switches).