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

# List Invites Handler

> List invites with pagination, filtering, and sorting.

Supports filtering by tenant_id (requires admin access), email, and status.
Results can be sorted by created_at, updated_at, expires_at, or accepted_at.



## OpenAPI

````yaml /openapi.yaml get /v1/invites
openapi: 3.1.0
info:
  title: Knowledge Stack API
  description: Knowledge Stack backend API for authentication and knowledge management
  version: 0.1.0
servers:
  - url: http://localhost:8000
    description: Knowledge Stack API local dev server
security: []
tags:
  - name: auth
    description: Authentication and identity management
  - name: users
    description: User accounts
  - name: tenants
    description: Tenant management
  - name: invites
    description: Tenant invitations
  - name: folders
    description: Folder management
  - name: documents
    description: Document management
  - name: document-versions
    description: Document version management
  - name: sections
    description: Document sections
  - name: chunks
    description: Chunk CRUD and semantic search
  - name: chunk-lineages
    description: Chunk lineage tracking
  - name: tags
    description: Tag management
  - name: path-parts
    description: Path part traversal and tagging
  - name: Threads
    description: Thread conversations
  - name: Thread Messages
    description: Thread message management
  - name: user-permissions
    description: User path permissions
  - name: workflows
    description: Ingestion workflows
paths:
  /v1/invites:
    get:
      tags:
        - invites
      summary: List Invites Handler
      description: >-
        List invites with pagination, filtering, and sorting.


        Supports filtering by tenant_id (requires admin access), email, and
        status.

        Results can be sorted by created_at, updated_at, expires_at, or
        accepted_at.
      operationId: list_invites
      parameters:
        - name: email
          in: query
          required: false
          schema:
            type: string
            nullable: true
            description: Filter by email (case-insensitive partial match)
            title: Email
          description: Filter by email (case-insensitive partial match)
        - name: status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/InviteStatus'
            nullable: true
            description: Filter by invite status (pending, accepted, expired)
            default: pending
            title: Status
          description: Filter by invite status (pending, accepted, expired)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Number of items per page
            default: 20
            title: Limit
          description: Number of items per page
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of items to skip
            default: 0
            title: Offset
          description: Number of items to skip
        - name: authorization
          in: header
          required: false
          schema:
            type: string
            nullable: true
            title: Authorization
        - name: ks_uat
          in: cookie
          required: false
          schema:
            type: string
            nullable: true
            title: Ks Uat
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_InviteResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InviteStatus:
      type: string
      enum:
        - pending
        - accepted
        - expired
      title: InviteStatus
    PaginatedResponse_InviteResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/InviteResponse'
          type: array
          title: Items
          description: List of items
        total:
          type: integer
          minimum: 0
          title: Total
          description: Total number of items
        limit:
          type: integer
          minimum: 1
          title: Limit
          description: Number of items per page
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: Number of items to skip
      additionalProperties: false
      type: object
      required:
        - items
        - total
        - limit
        - offset
      title: PaginatedResponse[InviteResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InviteResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        email:
          type: string
          format: email
          title: Email
        role:
          $ref: '#/components/schemas/TenantUserRole'
        expires_at:
          type: string
          format: date-time
          title: Expires At
        accepted_at:
          type: string
          format: date-time
          nullable: true
          title: Accepted At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        invite_link:
          type: string
          title: Invite Link
        email_id:
          type: string
          format: uuid
          nullable: true
          title: Email Id
      additionalProperties: false
      type: object
      required:
        - id
        - tenant_id
        - email
        - role
        - expires_at
        - created_at
        - updated_at
        - invite_link
      title: InviteResponse
      description: Invite response model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TenantUserRole:
      type: string
      enum:
        - USER
        - OWNER
        - ADMIN
      title: TenantUserRole
      description: Tenant user role.

````