GET
/api/users/currentGet the authenticated user's details
Retrieves the authenticated user's account details, including their identity, role, status, and permissions. Use the returned is_current field to identify the authenticated user's record; status can be active, invited, or blocked.
200Returns the authenticated user's account object, including their ID, email, name, role, status, permissions, and group assignments.
auto_groupsarray<string>required
Group IDs to auto-assign to peers registered by this user
emailstringrequired
User's email address
idstringrequired
User ID
idp_idstringoptional
Identity provider ID (connector ID) that the user authenticated with. Only populated for users with Dex-encoded user IDs.
is_blockedbooleanrequired
Is true if this user is blocked. Blocked users can't use the system
is_currentbooleanoptional
Is true if authenticated user is the same as this user
is_service_userbooleanoptional
Is true if this user is a service user
issuedstringoptional
How user was issued by API or Integration
last_loginstringoptional
Last time this user performed a login to the dashboard
namestringrequired
User's name from idp provider
passwordstringoptional
User's password. Only present when user is created (create user endpoint is called) and only when IdP supports user creation with password.
pending_approvalbooleanrequired
Is true if this user requires approval before being activated. Only applicable for users joining via domain matching when user_approval_required is enabled.
permissionsobjectoptional
rolestringrequired
User's NetBird account role
statusstringrequired
User's status
400Returned when the request is rejected as a bad request.
401Returned when authentication is required but missing or invalid.
403Returned when the authenticated user is not permitted to access this resource.
500Returned when an internal server error occurs.
Error handling
A 400 indicates the request was rejected as a bad request. A 401 is returned when valid authentication is missing, and a 403 when the authenticated user is not permitted to access this resource. A 500 indicates an internal server error; send a valid Authorization header when authenticating.