> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snackbase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a user

> Get a specific user by ID (superadmin only).



## OpenAPI

````yaml get /api/v1/users/{user_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/users/{user_id}:
    get:
      tags:
        - users
        - Users
      summary: Get a user
      description: Get a specific user by ID (superadmin only).
      operationId: get_user_api_v1_users__user_id__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/snackbase__infrastructure__api__schemas__users_schemas__UserResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    snackbase__infrastructure__api__schemas__users_schemas__UserResponse:
      properties:
        id:
          type: string
          title: Id
          description: User ID
        email:
          type: string
          title: Email
          description: User's email address
        account_id:
          type: string
          title: Account Id
          description: Account ID (UUID)
        account_code:
          type: string
          title: Account Code
          description: Human-readable account code in XX#### format (e.g., AB1234)
        account_name:
          type: string
          title: Account Name
          description: Account display name
        role_id:
          type: integer
          title: Role Id
          description: Role ID
        role_name:
          type: string
          title: Role Name
          description: Role name
        is_active:
          type: boolean
          title: Is Active
          description: Whether the user can log in
        auth_provider:
          type: string
          title: Auth Provider
          description: Authentication provider type ('password', 'oauth', 'saml')
        auth_provider_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Auth Provider Name
          description: Specific provider name (e.g., 'google', 'github')
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External provider's user ID
        external_email:
          anyOf:
            - type: string
            - type: 'null'
          title: External Email
          description: Email from external provider
        profile_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Profile Data
          description: Additional profile data from external provider
        email_verified:
          type: boolean
          title: Email Verified
          description: Whether the user's email is verified
        email_verified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Email Verified At
          description: When the email was verified
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the user was created
        last_login:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Login
          description: Last successful login
      type: object
      required:
        - id
        - email
        - account_id
        - account_code
        - account_name
        - role_id
        - role_name
        - is_active
        - auth_provider
        - email_verified
        - created_at
      title: UserResponse
      description: |-
        Response schema for a single user.

        Includes user details along with related account and role information.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````