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

# Get User Profile By Id

> Profile of another user, scoped to the caller's org.

Access rules — enforced by `load_user_for_crew_edit`:
  - The caller may always view their own profile (404 indistinguishable
    from "not in your org" otherwise).
  - admin / office-admin may view any user in their org.
  - Everyone else gets 404.

Role surfaced in the response comes from the DB display cache (kept
fresh by membership webhooks + the hourly reconciliation worker).
The JWT-authoritative role only applies to the caller — not the
target — which is exactly the documented use of `users.role`.

Profile picture is resolved the same way as `/me`: custom upload's
thumb derivative if present + ready, else the WorkOS-provided URL.



## OpenAPI

````yaml /openapi.json get /api/v1/shared/users/{user_id}/profile
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/shared/users/{user_id}/profile:
    get:
      tags:
        - shared-users
      summary: Get User Profile By Id
      description: |-
        Profile of another user, scoped to the caller's org.

        Access rules — enforced by `load_user_for_crew_edit`:
          - The caller may always view their own profile (404 indistinguishable
            from "not in your org" otherwise).
          - admin / office-admin may view any user in their org.
          - Everyone else gets 404.

        Role surfaced in the response comes from the DB display cache (kept
        fresh by membership webhooks + the hourly reconciliation worker).
        The JWT-authoritative role only applies to the caller — not the
        target — which is exactly the documented use of `users.role`.

        Profile picture is resolved the same way as `/me`: custom upload's
        thumb derivative if present + ready, else the WorkOS-provided URL.
      operationId: get_user_profile_by_id_api_v1_shared_users__user_id__profile_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserProfileResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UserProfileResponseDTO:
      properties:
        user:
          $ref: '#/components/schemas/UserProfileDTO'
        organization:
          anyOf:
            - $ref: '#/components/schemas/OrganizationInfoDTO'
            - type: 'null'
        assignments:
          items:
            $ref: '#/components/schemas/AssignmentWithShipDTO'
          type: array
          title: Assignments
      type: object
      required:
        - user
        - organization
        - assignments
      title: UserProfileResponseDTO
      description: Complete profile response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserProfileDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        emailVerified:
          type: boolean
          title: Emailverified
        firstName:
          type: string
          title: Firstname
        lastName:
          type: string
          title: Lastname
        profilePictureUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Profilepictureurl
        hasCustomProfilePicture:
          type: boolean
          title: Hascustomprofilepicture
          default: false
        role:
          type: string
          title: Role
        state:
          type: string
          title: State
        lastLogin:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Lastlogin
        createdAt:
          type: string
          format: date-time
          title: Createdat
      type: object
      required:
        - id
        - email
        - emailVerified
        - firstName
        - lastName
        - profilePictureUrl
        - role
        - state
        - lastLogin
        - createdAt
      title: UserProfileDTO
      description: |-
        User profile for /users/me endpoint.

        `profile_picture_url`: server-resolved. If the user has uploaded a
        custom photo this is a presigned URL for that upload's `thumb`
        derivative (256 px); otherwise it's the WorkOS-provided URL.

        `has_custom_profile_picture`: lets the FE show a "Remove photo"
        affordance only when there's a custom photo to remove.
    OrganizationInfoDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: OrganizationInfoDTO
      description: Organization info for profile.
    AssignmentWithShipDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        shipName:
          type: string
          title: Shipname
        shipImoNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipimonumber
        role:
          type: string
          title: Role
        startDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Startdate
        endDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enddate
        isActive:
          type: boolean
          title: Isactive
      type: object
      required:
        - id
        - shipName
        - role
        - startDate
        - endDate
        - isActive
      title: AssignmentWithShipDTO
      description: Assignment with ship details.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````