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

# Deactivate a user

> Deactivate a user (soft delete via is_active flag) (superadmin only).

The user will not be able to log in, but their data is preserved.
You cannot deactivate yourself.



## OpenAPI

````yaml delete /api/v1/users/{user_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/users/{user_id}:
    delete:
      tags:
        - users
        - Users
      summary: Deactivate a user
      description: |-
        Deactivate a user (soft delete via is_active flag) (superadmin only).

        The user will not be able to log in, but their data is preserved.
        You cannot deactivate yourself.
      operationId: deactivate_user_api_v1_users__user_id__delete
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
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

````