> ## 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.

# List Users

> List all users in the caller's organization with pagination.

Open to all staff roles (admin, office-admin, office-employee) — this
is the crew management table that operations staff need daily. Role
*assignment* (PATCH /{user_id}/role) is still admin-only below.

`role` is the locally-cached WorkOS membership role, kept fresh by the
membership webhook handlers and the hourly reconciliation worker. It's
safe for filtering and display; authz decisions still go through the
JWT.



## OpenAPI

````yaml /openapi.json get /api/v1/shared/users
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/shared/users:
    get:
      tags:
        - shared-users
      summary: List Users
      description: |-
        List all users in the caller's organization with pagination.

        Open to all staff roles (admin, office-admin, office-employee) — this
        is the crew management table that operations staff need daily. Role
        *assignment* (PATCH /{user_id}/role) is still admin-only below.

        `role` is the locally-cached WorkOS membership role, kept fresh by the
        membership webhook handlers and the hourly reconciliation worker. It's
        safe for filtering and display; authz decisions still go through the
        JWT.
      operationId: list_users_api_v1_shared_users_get
      parameters:
        - name: role
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by cached role
            title: Role
          description: Filter by cached role
        - name: state
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by state
            title: State
          description: Filter by state
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Items per page
            default: 10
            title: Limit
          description: Items per page
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Pagination cursor
            title: Cursor
          description: Pagination cursor
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
              - type: 'null'
            description: Search term
            title: Search
          description: Search term
        - name: include_count
          in: query
          required: false
          schema:
            type: boolean
            description: Include total count
            default: false
            title: Include Count
          description: Include total count
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_UserDetailDTO_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PaginatedResponse_UserDetailDTO_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/UserDetailDTO'
          type: array
          title: Items
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Nextcursor
        hasMore:
          type: boolean
          title: Hasmore
          default: false
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
      type: object
      required:
        - items
      title: PaginatedResponse[UserDetailDTO]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserDetailDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        firstName:
          type: string
          title: Firstname
        lastName:
          type: string
          title: Lastname
        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
        - firstName
        - lastName
        - role
        - state
        - lastLogin
        - createdAt
      title: UserDetailDTO
      description: |-
        User info for admin view — hides technical fields.

        `role` is the cached WorkOS membership role, used purely to render the
        crew table. Never read it for authorization.
    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

````