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

# Get a specific user

> This endpoint retrieves a specific user.

`user_name` is the unique identifier of the person to retrieve (case-insensitive).

Returns `404` if the user does not exist.




## OpenAPI

````yaml /openapi.yaml get /users/{user_name}
openapi: 3.1.0
info:
  title: Tribal Habits Public API
  version: '1'
  description: >
    The Tribal Habits Public API V1. Use it to manage your Tribal Habits user
    accounts (list, show, create and update) and other entities.


    Replace `myorg` in the server URL with your organisation's subdomain. See
    [Vanity URL](/vanity-url) if you use your own domain.
servers:
  - url: https://myorg.tribalhabits.com/papi
security:
  - ApiKeyHeader: []
tags:
  - name: Users
    description: Users
  - name: Topics
    description: Topics
  - name: Pathways
    description: Pathways
  - name: Enrolments
    description: Topic and Pathway Enrolments
  - name: Certificates
    description: >-
      Certificate generation and retrieval for completed topic and pathway
      enrolments.
  - name: External Knowledge
    description: Knowledge obtained from a source external of Tribal Habits.
  - name: Webhooks
    description: >-
      Webhooks triggered from certain actions in code that will call URLs
      assigned by you.
paths:
  /users/{user_name}:
    parameters:
      - name: user_name
        in: path
        required: true
        schema:
          type: string
        example: '12345'
    get:
      tags:
        - Users
      summary: Get a specific user
      description: >
        This endpoint retrieves a specific user.


        `user_name` is the unique identifier of the person to retrieve
        (case-insensitive).


        Returns `404` if the user does not exist.
      operationId: getUser
      responses:
        '200':
          description: The user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              examples:
                example:
                  $ref: '#/components/examples/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    User:
      type: object
      description: >-
        The user object returned by the user endpoints. Custom fields are
        included as `X-` fields, see [Custom fields](/custom-fields).
      properties:
        user_name:
          type: string
          description: >-
            Unique identifier of the user. Always stored and returned in lower
            case
        first_name:
          type: string
          description: User's first name
        last_name:
          type: string
          description: User's last name
        email:
          type: string
          description: User's email address
        manager_email:
          type:
            - string
            - 'null'
          description: Email address of the user's manager. `null` if not set
        manager_2_email:
          type:
            - string
            - 'null'
          description: Email address of the user's 2nd manager. `null` if not set
        manager_3_email:
          type:
            - string
            - 'null'
          description: Email address of the user's 3rd manager. `null` if not set
        manager_4_email:
          type:
            - string
            - 'null'
          description: Email address of the user's 4th manager. `null` if not set
        manager_5_email:
          type:
            - string
            - 'null'
          description: Email address of the user's 5th manager. `null` if not set
        mentor_email:
          type: string
          description: Email address of the user's mentor
        lms_learner_id:
          type: string
          description: User's identifier in your company LMS
        lms_reference:
          type: string
          description: User's LMS name in your company LMS
        org_admin:
          type: boolean
          description: '`true` if the user is an administrator'
        creator:
          type: boolean
          description: '`true` if the user can create topics'
        team_leader:
          type: boolean
          description: >-
            `true` if the user is the manager of at least one other user
            (derived from other users' manager emails)
        created_at:
          type: string
          format: date-time
          description: Timestamp
        updated_at:
          type: string
          format: date-time
          description: Timestamp
        current_sign_in_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp. `null` if the user has never signed in
        admin_type:
          type:
            - integer
            - 'null'
          description: >-
            Administrator type as a number: 0 = super, 1 = standard, 2 =
            knowledge, 3 = reporting, 4 = instructor, 5 = restricted, 6 =
            observer, 7 = people, 8 = library. `null` if not an administrator
        deactivate_scheduled_date:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp of the date on which the account is scheduled to be
            deactivated, or `null`
        reactivate_scheduled_date:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp of the date on which the account is scheduled to be
            reactivated, or `null`
        language:
          type: string
          description: Language code, eg `en`
        created_by:
          type: string
          description: How the user was created, eg `API`
        timezone:
          type: string
          description: User's time zone, eg `Australia/Sydney`
        user_notifications_enabled:
          type: boolean
          description: '`true` if the user receives email notifications'
        team_leader_report_frequency:
          type:
            - string
            - 'null'
          description: >-
            Team leader report email frequency. See [Update a specific
            user](/api-reference/users/update-a-specific-user) for values
        learner_report_frequency:
          type:
            - string
            - 'null'
          description: >-
            Learner report email frequency. See [Update a specific
            user](/api-reference/users/update-a-specific-user) for values
        assessor_report_frequency:
          type:
            - string
            - 'null'
          description: >-
            Assessor report email frequency. See [Update a specific
            user](/api-reference/users/update-a-specific-user) for values
        default_landing_page:
          type: string
          description: Page shown after login, or `Default`
        org_admin_access:
          type: string
          description: Name of the administrator type (see `admin_type`), or `none`
        login:
          type: string
          enum:
            - internal
            - external
          description: '`internal` or `external`'
        type:
          type: string
          description: Type of user, eg `Staff`, `Client`
        active:
          type: boolean
          description: '`false` if the account has been deactivated'
        X-[Custom]:
          description: Custom fields. See [Custom fields](/custom-fields)
        platform_champion:
          type: boolean
          description: '`true` if the user is a platform champion for your organisation'
        role_1:
          type:
            - string
            - 'null'
          description: Name of the role in position 1, or `null`
        role_2:
          type:
            - string
            - 'null'
          description: Name of the role in position 2, or `null`
        role_3:
          type:
            - string
            - 'null'
          description: Name of the role in position 3, or `null`
        role_4:
          type:
            - string
            - 'null'
          description: Name of the role in position 4, or `null`
        role_5:
          type:
            - string
            - 'null'
          description: Name of the role in position 5, or `null`
        groups:
          type: string
          description: Group names, sorted and separated by semicolons
        goals:
          type: string
          description: Goal names, sorted and separated by semicolons
      patternProperties:
        ^X-:
          description: Custom field. See [Custom fields](/custom-fields)
  examples:
    User:
      summary: A user
      value:
        user_name: '12345'
        first_name: Bilbo
        last_name: Baggins
        email: bilbo@myorg.com
        manager_email: manager@company.com
        manager_2_email: manager2@company.com
        manager_3_email: null
        manager_4_email: null
        manager_5_email: null
        mentor_email: mentor@company.com
        lms_learner_id: '456'
        lms_reference: Testlms
        org_admin: false
        creator: false
        team_leader: false
        created_at: '2019-04-01T15:46:31.586+11:00'
        updated_at: '2021-06-15T09:25:25.756+10:00'
        current_sign_in_at: '2022-06-15T09:25:25.756+10:00'
        admin_type: null
        deactivate_scheduled_date: '2022-06-15T00:00:00.000+10:00'
        reactivate_scheduled_date: null
        language: en
        created_by: API
        timezone: Australia/Sydney
        user_notifications_enabled: true
        team_leader_report_frequency: every_thursday
        learner_report_frequency: null
        assessor_report_frequency: every_wednesday
        default_landing_page: Default
        org_admin_access: none
        login: internal
        type: Client
        active: true
        X-Country: Australia
        X-State: Queensland
        X-Preferred Name: Jack
        platform_champion: false
        role_1: Instructor
        role_2: null
        role_3: null
        role_4: null
        role_5: null
        groups: Brisbane;Bundaberg
        goals: Goal1;Goal2
  responses:
    Unauthorized:
      description: >-
        Unauthorized - The request does not include the API key, the API key is
        incorrect, or API access is not enabled on your plan.
    NotFound:
      description: Not Found - The specified resource or endpoint could not be found
      content:
        application/json:
          schema:
            type: string
          example: not found
    TooManyRequests:
      description: >-
        Too Many Requests - You have exceeded the rate limit. See [Rate
        limits](/rate-limits)
      headers:
        Retry-After:
          description: Number of seconds until the rate limit window resets
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              retry_after_seconds:
                type: integer
          example:
            error: Rate limit exceeded. Please slow down.
            retry_after_seconds: 23
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: Authorization
      description: >
        Your organisation's API key, sent as `Authorization: my_api_key`. The
        key can also be passed as an `api_key` query parameter. See
        [Authentication](/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.