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

# Activate Tenant User Handler

> Reactivate a deactivated tenant user.



## OpenAPI

````yaml /openapi.yaml post /v1/tenants/{tenant_id}/users/{user_id}/activate
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/tenants/{tenant_id}/users/{user_id}/activate:
    post:
      tags:
        - tenants
      summary: Activate Tenant User Handler
      description: Reactivate a deactivated tenant user.
      operationId: activate_tenant_user
      parameters:
        - name: tenant_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tenant Id
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - 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/TenantUserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TenantUserResponse:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
          description: User ID
        email:
          type: string
          nullable: true
          title: Email
          description: User email address
        first_name:
          type: string
          nullable: true
          title: First Name
          description: User first name
        last_name:
          type: string
          nullable: true
          title: Last Name
          description: User last name
        role:
          $ref: '#/components/schemas/TenantUserRole'
          description: User role within the tenant
        deactivated_on:
          type: string
          format: date-time
          nullable: true
          title: Deactivated On
          description: Soft-deletion timestamp. NULL = active.
        is_tenant_idp_managed:
          type: boolean
          title: Is Tenant Idp Managed
          description: Whether the user is managed by the tenant's identity provider
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Date the user was added to the tenant
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Date the user was updated
      additionalProperties: false
      type: object
      required:
        - user_id
        - role
        - is_tenant_idp_managed
        - created_at
        - updated_at
      title: TenantUserResponse
      description: Tenant member response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TenantUserRole:
      type: string
      enum:
        - USER
        - OWNER
        - ADMIN
      title: TenantUserRole
      description: Tenant user role.
    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

````