Skip to main content
Use the current-caller endpoint to bootstrap a dashboard session or inspect an API key’s effective context before making resource requests.

Endpoints

MethodPathDescriptionAuth
GET/users/meReturn the signed-in user’s resource tree or the API key’s context[User+Key]

Get the current caller

GET /users/me The response shape depends on how the request is authenticated.

User session

Returns the current user plus every organization membership, role, environment, tenant, and knowledge base available through that membership.

API key

Returns authType: "api_key", key metadata and scopes, tenant and knowledge-base allowlists, and the key’s environment and organization.
curl "https://api.autosage.ai/api/v1/users/me" \
  -H "Authorization: Bearer $AUTOSAGE_KEY"
For a user session:
curl "https://api.autosage.ai/api/v1/users/me" \
  -H "Cookie: YOUR_SESSION_COOKIE"
Call this endpoint during setup to discover IDs instead of storing organization and environment configuration in multiple places. For API keys, an empty tenantIds or knowledgeBaseIds array is an unrestricted allowlist within the key’s higher-level boundary, not zero access.
This endpoint describes the caller’s context; it does not replace endpoint-specific scope and role checks. A key can only call routes that allow API-key actors and for which it has the required scope.

Next steps

Authentication

Choose between user sessions and API keys.

Tenancy

Understand the resource tree returned here.

API keys

Configure scopes and resource allowlists.