We use cookies to enhance your experience and measure how the site performs. Choose "Essential Only" to disable analytics. Read our Privacy Policy.

    Odeus Docs

    Deactivate User

    Remove a user from your Odeus workspace while preserving their data

    Deactivate User

    Remove a user from your Odeus workspace while preserving their data

    ⚠️ Using our API via a dedicated deployment? Just replace api.odeus.ai with your deployment's base URL: <deployment-url>/api/public

    This endpoint removes a user from your workspace. Their data — including conversations, assistants, files, and integrations — is preserved and fully restored if they are re-added later.

    Prerequisites

    • API Key with the USER_MANAGEMENT_API scope
    • The API key must be created by a workspace admin

    Behavior

    • User not found or not an active member? Returns 404.
    • Deactivated users lose workspace access immediately.
    • All user data is retained and accessible again upon reactivation.

    Odeus intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

    OpenAPI

    openapi: 3.0.0
    info:
      title: Odeus API
      version: 3.0.0
    servers:
      - url: https://api.odeus.ai
    security:
      - bearerAuth: []
    paths:
      /user-management/v1/deactivate-user:
        post:
          tags:
            - User Management
          summary: Deactivate a workspace user
          description: >
            Removes a user from the workspace by email. The user immediately loses
            access,
    
            but all their data (conversations, assistants, files, integrations) is
            preserved
    
            and restored if they are re-added later.
          parameters: []
          requestBody:
            required: true
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/UserEmailRequest'
                examples:
                  deactivate_user:
                    summary: Deactivate a user
                    value:
                      email: [email protected]
          responses:
            '200':
              description: User deactivated successfully
              content:
                application/json:
                  schema:
                    $ref: '#/components/schemas/UserManagementResponse'
                  examples:
                    success:
                      summary: User deactivated
                      value:
                        status: success
                        message: User deactivated
            '401':
              description: >-
                Unauthorized - API key is missing, invalid, or the key creator was
                not found
              content:
                application/json:
                  schema:
                    $ref: '#/components/schemas/UserManagementError'
            '404':
              description: User not found or not an active member
              content:
                application/json:
                  schema:
                    $ref: '#/components/schemas/UserManagementError'
                  examples:
                    not_found:
                      summary: User not found
                      value:
                        message: User not found or not an active member
            '500':
              description: Internal server error
              content:
                application/json:
                  schema:
                    $ref: '#/components/schemas/UserManagementError'
    components:
      schemas:
        UserEmailRequest:
          type: object
          required:
            - email
          properties:
            email:
              type: string
              format: email
              description: Email address of the user
              example: [email protected]
        UserManagementResponse:
          type: object
          properties:
            status:
              type: string
              enum:
                - success
              description: Always "success" when the request is processed
              example: success
            message:
              type: string
              description: Human-readable summary of the result
              example: User deactivated
          required:
            - status
            - message
        UserManagementError:
          type: object
          properties:
            message:
              type: string
              description: Error message
              example: User not found or not an active member
          required:
            - message
      securitySchemes:
        bearerAuth:
          type: http
          scheme: bearer
          bearerFormat: API Key
          description: API key as Bearer token. Format "Bearer YOUR_API_KEY"