---
title: "Get the current user"
method: GET
path: "/api/v1/user"
tags: ["User"]
---

# Get the current user

`GET /api/v1/user`

## StackHawk Current User

This endpoint provides details about the requesting user. This information helps determine what access an authorized user has on the StackHawk platform, and how they are authenticated.

The StackHawk user is seperated into two sections. `provider` specifies how the user authenticates. `external` specifies details of the user, and the access they have to the StackHawk Platform.

### User

A StackHawk User as identified by the platform.

| Parameter | Default | Description |
|:---:|:---:|:---:|
|stackhawkId|""|An internal identifier for this user. _This is not the user uuid_.|
|provider|{}|Information about the login provider assigned to this user. [Read More](#providerinfo)|
|external|{}|Information about the user itself, and how they appear in the platform. [Read More](#userexternal)|
|createdTimestamp|0|Creation timestamp of this user.|

### ProviderInfo

Information about a users access Provider to the StackHawk platform.

| Parameter | Default | Description |
|:---:|:---:|:---:|
|slug|"UNKNOWN"|User access provider.|
|clientId|""|Provider client Id.|
|created|0|Milliseconds since epoch timestamp of when the user access was granted.|

### UserExternal

Information about the User and how they can access the platform.

| Parameter | Default | Description |
|:---:|:---:|:---:|
|id|""|The UUID identifier of this user.|
|email|""|Users email address.|
|firstName|""|Users first name.|
|lastName|""|Users last name.|
|fullName|""|Users full name.|
|avatarUrl|""|Users avatar url.|
|applicationIds|[]|An array of application ids this user has access to.|
|organizations|[]|Organizations a user is a part of. [Read More](#userorganization)|
|preferences|{}|User preferences; options that can be set by the user. [Read More](#userpreferences)|
|metadata|[]|Metadata associated to this external user. Primarily used for stuffing 3rd party verification data.|
|teams|[]|Teams this user belongs to.|

### UserPreferences

User settings and preferences for interaction within StackHawk.

| Parameter | Default | Description |
|:---:|:---:|:---:|
|dontReceiveWeeklyEmail|false|If the user will be opted out of weekly organization update emails.|
|defaultOrganizationId|""|The UUID identifier of the organization a user currently logs into.|
|dontReceiveTrialingEmails|false|If `true`, the user will be opted out of stackhawk subscription-trialing notifications.|
|pinnedApplicationIds|[]|UUIDs of applications the user has pinned to the top of the application list.|

User preferences can be adjusted from the [account settings page](https://app.stackhawk.com/settings/account) in the StackHawk platform.

### UserOrganization

Represents the relationship between a User and an Organization they belong to.

| Parameter | Default | Description |
|:---:|:---:|:---:|
|organization|{}|The StackHawk organization this user belongs to.|
|role|"UNKNOWN"|The organization role the user belongs to within this organization.|
|features|[]|Specific access features available to this organization.|
|metadata|[]|The user's organizational specific metadata.|
|achievements|[]|Specific product journey events that have triggered for this user.|
|permissions|[]|Permissions the User has in this organization.|

### Organization

A StackHawk Organization.

| Parameter | Default | Description |
|:---:|:---:|:---:|
|id|""|The UUID identifier of this StackHawk Organization.|
|name|""|The name of this Organization.|
|subscription|{}|The billing subscription of this Organization.|
|isLinkedToExternalBilling|false|If this organization is yet connected to external billing (Stripe).|
|plan|""|The feature plan this organization belongs to.|
|features|[]|Specific overrides to the feature flags in the plan.|
|settings|{}|Organization settings.|
|createdTimestamp|0|Creation timestamp of this organization.|

A StackHawk platform user can belong to many organizations.


> Requires `read:profile` permission.

## Response `200`

Response of the current user.

- UserUserResponse — Response of the current user.
  - `unclaimedInviteOrganizationIds` string[] — Unclaimed invitations to the organization.
  - `user` UserUser — A StackHawk User as identified by the platform.
    - `createdTimestamp` integer — Creation timestamp of this user.
    - `external` UserUserExternal — Information about the User and how they can access the platform.
      - `applicationIds` string[] — An array of application ids this user has access to.
      - `avatarUrl` string — Users avatar url.
      - `email` string — Users email address.
      - `firstName` string — Users first name.
      - `fullName` string — Users full name.
      - `id` string — The UUID identifier of this user.
      - `lastName` string — Users last name.
      - `metadata` UserUserMetadata[] — Metadata associated to this external user. Primarily used for stuffing 3rd party verification data.
        - `name` string — Metadata name.
        - `value` string — Metadata value.
      - `organizations` UserUserOrganization[] — Organizations a user is a part of.
        - `achievements` UserUserAchievement[] — Specific product journey events that have triggered for this user.
          - `achievement` 'UNKNOWN_ACHIEVEMENT' | 'CLI_RAN_HAWK_INIT' | 'CLI_RAN_FIRST_SCAN' | 'CLI_FIRST_SCAN_SUCCESS' | 'CLI_AUTHENTICATED_SCAN_SUCCESS' — Achievement event. One of a few defined events that can happen.
          - `timestamp` integer — Achievement timestamp.
        - `features` FeatureFeature[] — Specific access features available to this organization.
          - `enabled` boolean — If the feature is enabled.
          - `name` string — The name of the feature.
        - `metadata` UserUserMetadata[] — The user's organizational specific metadata.
          - `name` string — Metadata name.
          - `value` string — Metadata value.
        - `organization` OrganizationOrganization — A StackHawk Organization.
          - `createdTimestamp` integer — Creation timestamp of this organization.
          - `features` FeatureFeature[] — Specific overrides to the feature flags in the plan.
            - `enabled` boolean — If the feature is enabled.
            - `name` string — The name of the feature.
          - `id` string — The UUID identifier of this StackHawk Organization.
          - `isLinkedToExternalBilling` boolean — If this organization is yet connected to external billing (Stripe).
          - `name` string — The name of this Organization.
          - `plan` string — The feature plan this organization belongs to.
          - `settings` OrganizationOrgSettings — Organization settings for interaction within StackHawk
            - `cloudScanSettings` OrganizationCloudScanSettings — settings for Cloud Scans
              - …
            - `customPluginLimit` integer — number of custom plugins a company is allowed to register.
            - `inviteLimit` integer — Maximum pending invites for this org. 0 indicates to use the default.
            - `ipAllowListingSettings` OrganizationIPAllowListingSettings — Defines ranges of IP addresses that users of this org must connect through
              - …
            - `isOrganizationSamlOnly` boolean — default is false, therefore all auth methods are allowed by default.
            - `isTurnedOffAI` boolean — default is false, therefore AI enabled.
            - `isTurnedOffOASGen` boolean — default is false, therefore OAS generation is enabled.
            - `limitedMemberRoleSettings` OrganizationLimitedMemberSettings — settings for limited MEMBER role capacity
              - …
            - `screenrSettings` OrganizationScreenrSettings — Screenr session settings (managed by StackHawk admins)
              - …
            - `signupPromoCode` string — Signup promo code
          - `subscription` OrganizationSubscription — Properties of the subscription for entitled access to the StackHawk platform
            - `appCount` integer — Soft application limit for this organization
            - `customerId` string — CustomerId from billing provider
            - `endDate` integer — End Date of this subscription, in seconds from epoch
            - `isEnabled` boolean — If external billing is enabled
            - `isSelfServe` boolean — If the subscription was created via self-serve or not
            - `productId` string — The ID of the purchased product subscription
            - `productName` string — The name of the purchased product subscription
            - `providerStatus` string — The status of the subscription as reported verbatim by the billing provider (e.g. Stripe's "trialing", "active", "canceled", "past_due"). Informational only.
            - `quantity` integer — The quantity of units in this subscription
            - `recurringInterval` 'RECURRING_INTERVAL_UNKNOWN' | 'MONTH' | 'YEAR' — The billing recurring interval for this subscription
            - `recurringIntervalCount` integer — How often in the recurring interval billing occurs
            - `stackhawkOrgId` string — The organization UUID for this subscription
            - `startDate` integer — Start Date of this subscription, in seconds from epoch
            - `status` 'SUBSCRIPTION_UNKNOWN' | 'TRIALING' | 'ACTIVE' | 'INCOMPLETE' | 'CANCELLED' | 'FREE' | 'INCOMPLETE_EXPIRED' | 'PAST_DUE' | 'UNPAID' | 'DOWNGRADED' — The status of the organization subscription
            - `subscriptionId` string — SubscriptionId from billing provider
            - `unitAmount` integer — The number of units with this subscription
            - `userCount` integer — Soft user limit for this organization
        - `permissions` string[] — Permissions the User has in this organization.
        - `role` 'UNKNOWN' | 'OWNER' | 'ADMIN' | 'MEMBER' | 'TEAM_ADMIN' | 'VIEW_ONLY' | 'SCAN_ONLY_SERVICE_ACCOUNT' — The organization role the user belongs to within this organization.
      - `preferences` UserUserPreferences — User settings and preferences for interaction within StackHawk.
        - `defaultOrganizationId` string — The UUID identifier of the organization a user currently logs into.
        - `dontReceiveTrialingEmails` boolean — If `true`, the user will be opted out of stackhawk subscription-trialing notifications.
        - `dontReceiveUpdatesEmail` boolean — UNUSED. (currently unused) if `true`, the user will be opted out of Company Update emails.
        - `dontReceiveWeeklyEmail` boolean — If the user will be opted out of weekly organization update emails.
        - `pinnedApplicationIds` string[] — UUIDs of applications the user has pinned to the top of the application list.
      - `teams` UserUserTeam[] — Teams this user belongs to.
        - `id` string — The UUID identifier of the team.
        - `name` string — The name of the team.
        - `organizationId` string — The organization ID this team belongs to.
    - `organizationIds` string[] — OrganizationIds **deprecated** - 4/26/22.
    - `provider` UserProviderInfo — Information about a users access Provider to the StackHawk platform.
      - `clientId` string — Provider client Id.
      - `created` integer — Milliseconds since epoch timestamp of when the user access was granted.
      - `slug` 'GITHUB' | 'GOOGLE' | 'STACKHAWK' | 'SAMLIDP' | 'AZURE' — User access provider.
    - `stackhawkId` string — An internal identifier for this user. _This is not the user uuid_.

---

[API](https://skmtc.net/stackhawk/apis/stackhawk-public-api.md) · [All operations](https://skmtc.net/stackhawk/apis/stackhawk-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stackhawk/stackhawk-public-api/versions/ad3dfd54cb63/schema)
