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

# Org Remove User

> Endpoint for organization admins to remove a user from their organization.

Args:
    username (str): The email of the user to be removed from the organization.

Returns:
    dict: A message confirming successful removal of the user.

Raises:
    HTTPException 404:
        - If the organization or the specified user is not found.
    HTTPException 409:
        - If the user does not belong to the organization.
    HTTPException 500:
        - If an internal error occurs during the removal process.



## OpenAPI

````yaml delete /api/org/remove_user/{username}
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/org/remove_user/{username}:
    delete:
      tags:
        - Org
      summary: Org Remove User
      description: >-
        Endpoint for organization admins to remove a user from their
        organization.


        Args:
            username (str): The email of the user to be removed from the organization.

        Returns:
            dict: A message confirming successful removal of the user.

        Raises:
            HTTPException 404:
                - If the organization or the specified user is not found.
            HTTPException 409:
                - If the user does not belong to the organization.
            HTTPException 500:
                - If an internal error occurs during the removal process.
      operationId: org_remove_user
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
            title: Username
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````