Principal
ResponseWho the current credential is (getCurrentUser): a CLI's whoami, and how an agent learns its organization and scopes before acting. Public API stage 5 normalised the web app's user answer to it; the web app's own fields stay beside the public ones, x-internal.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
6api_key: an organization's own machine credential (Settings → API access). installation: a connected Tracken app. user: a signed-in person (the web app, the CLI after tracken login, an MCP client). New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) api_key, installation, user
The organization the request is scoped to: a machine credential's own; for a person, the X-Organization-ID they sent when it names an organization they can open. Null for a person who sent none.
Scopes the token holds, in the vocabulary of the public API's oauth2 scheme. A person's effective rights are these scopes intersected with their role; empty for the web app's own sign-in, which names no scopes and is not narrowed (its role alone decides).
Organizations this person can open (directly or through a firm mandate), each with their role and the permissions this token may use there. Empty for a machine credential, which belongs to exactly one organization (organization_id).
4 attributes of each item
Effective permission strings (server-computed): the role's, plus the owner privileges when the caller owns the organization. For a token narrowed by scopes (the CLI, an MCP client), the role's cut down to what those scopes admit, as the API enforces.
The machine credential in use; null for a person.
6 attributes of credential
The app installation, for a connected Tracken app; null for an API credential.
The name an administrator gave the API credential; null for an app installation, or a credential this organization no longer lists.
How the API credential proves itself: secret (a client secret) or public_key (a signed assertion, private_key_jwt); null when unknown. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) secret, public_key
When the API credential stops working; null for none.
The signed-in person; null for a machine credential.