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

# Deactivate User Everywhere

> Deactivate a user across every organization they belong to.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json patch /admin/users/{user_id}/deactivate
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /admin/users/{user_id}/deactivate:
    patch:
      tags:
        - admin-users
      summary: Deactivate User Everywhere
      description: Deactivate a user across every organization they belong to.
      operationId: deactivate_user_everywhere_admin_users__user_id__deactivate_patch
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeactivateUserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DeactivateUserResponse:
      properties:
        user_id:
          type: string
          title: User Id
        status:
          type: string
          title: Status
        deactivated_count:
          type: integer
          title: Deactivated Count
          default: 0
        organizations:
          items:
            $ref: '#/components/schemas/AdminUserOrgMembership'
          type: array
          title: Organizations
        deactivated_organization_ids:
          items:
            type: string
          type: array
          title: Deactivated Organization Ids
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - user_id
        - status
      title: DeactivateUserResponse
      description: Per-user summary returned by single and bulk deactivation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdminUserOrgMembership:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        deactivated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deactivated At
      type: object
      required:
        - id
        - name
      title: AdminUserOrgMembership
    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

````