API reference

Get current user

Returns the signed-in user plus all tenant memberships. Used by the dashboard on every page load.

GET/v1/admin/me

Returns information about the currently authenticated user and all tenants they belong to. Requires a bearer token (sign-in session) — does not work with API keys.

Request

bash
curl https://api-raven-cloud.autotribes.app/v1/admin/me \
  -H "Authorization: Bearer eyJ..." \
  -H "X-App-Name: raven-cloud"

Headers

HeaderRequiredNotes
AuthorizationYesBearer token from our auth service
X-App-NameYesAlways raven-cloud
X-Tenant-SlugNoThis endpoint is tenant-agnostic

Response

200 OK

json
{
  "user": {
    "id": "0eb6c9a2-3c1d-44b4-8b21-93e4f2d8c9a1",
    "email": "you@example.com",
    "name": "Your Name",
    "avatarUrl": "https://lh3.googleusercontent.com/..."
  },
  "memberships": [
    {
      "tenantId": "8ad4f7c2-9e3b-4a1c-bc2f-1d8e3a9b7c4d",
      "tenantSlug": "acme-co",
      "tenantName": "Acme Co",
      "role": "owner",
      "status": "active"
    },
    {
      "tenantId": "11b8d2c1-...",
      "tenantSlug": "acme-test",
      "tenantName": "Acme Test",
      "role": "admin",
      "status": "active"
    }
  ]
}

Field reference

FieldTypeDescription
user.idUUIDour auth service user ID — stable across sessions
user.emailstringFrom Google OAuth claim
user.namestring?From Google OAuth, may be null
memberships[]arrayAll tenants the user has access to
memberships[].roleenumowner | admin | member | viewer
memberships[].statusenumactive | suspended | archived

When to use it

The dashboard hits this on every page load to:

  • Verify the session is still valid (returns 401 otherwise)
  • Decide whether to redirect first-time users to onboarding (memberships is empty)
  • Populate the tenant switcher (when multiple memberships exist)