My Tenants
Get tenants the current user belongs to.
GET /api/tenant/mine
Returns a list of tenants the currently authenticated user is associated with. Does not require tenant context or specific permissions.
Auth: Required (any authenticated user, no x-tenant-id needed)
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Example
curl https://api.reten.ai/api/tenant/mine \
-H "Authorization: Bearer <token>"const response = await fetch("https://api.reten.ai/api/tenant/mine", {
headers: { "Authorization": "Bearer <token>" },
});
const tenants = await response.json();
// Use one of these tenant IDs as x-tenant-id in subsequent requests
const tenantId = tenants[0].id;import requests
response = requests.get(
"https://api.reten.ai/api/tenant/mine",
headers={"Authorization": "Bearer <token>"},
)
tenants = response.json()
# Use one of these tenant IDs as x-tenant-id in subsequent requests
tenant_id = tenants[0]["id"]Response 200 OK
[
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp",
"slug": "acme-corp"
},
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"name": "Beta Inc",
"slug": "beta-inc"
}
]Use one of the returned tenant IDs as the x-tenant-id header for subsequent API calls.