hzel
ReferenceStructures

UserInfoResponse

The user identity object returned by GET /api/v1/auth/me.

UserInfoResponse is returned by GET /api/v1/auth/me. It describes the hzel account associated with the token that made the request and how that request was authenticated.

Fields

FieldTypeDescription
user_idstring (UUID)Unique user identifier, formatted as a UUID string.
emailstringEmail address associated with the account.
rolestringAccount role. One of "admin" or "user".
auth_methodstringHow this specific request was authenticated. One of "session", "oidc", "pat", "oauth".

auth_method values

ValueMeaning
"session"Authenticated via a browser session cookie (e.g. username/password login).
"oidc"Authenticated via an OIDC provider (e.g. Google, GitHub).
"pat"Authenticated via a Personal Access Token (hzel_…).
"oauth"Authenticated via an OAuth application access token issued by the OAuth flow.

Example

{
  "user_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "email": "alice@example.com",
  "role": "user",
  "auth_method": "pat"
}

UserPermissions

Returned by GET /api/v1/programs/permissions/me. Reports the effective container-creation permission for the current user across all programs they belong to.

FieldTypeDescription
can_create_containersbooleantrue if the user is an admin, or is an accepted member of at least one program that grants container creation access.
{
  "can_create_containers": true
}