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

# Deactivate a user

> Deactivate a user with an audit reason. By default, the user's trading accounts for your firm are also blocked. Set `deactivate_accounts=false` to leave trading accounts unchanged.



## OpenAPI

````yaml /openapi.json post /api/users/{id}/deactivate/
openapi: 3.0.3
info:
  title: TBBO API
  version: 1.0.0
  description: >
    Authentication uses short-lived session tokens (3 hours).


    Send the token with every request using the `Authorization` header:


    ```

    Authorization: Token <token>

    ```


    Example:


    ```

    Authorization: Token 123abc456def789

    ```


    To obtain a token, call `POST /auth/login/` with valid credentials. The
    response includes a `key` value. Use that value in the header above for
    subsequent API calls.


    How to find required IDs:


    - `challenge_id`: Prop Tech Configuration -> Challenges

    - `user_id`: Tickblaze Manager -> Users

    - `account_id`: Tickblaze Manager -> Accounts 
servers: []
security: []
tags:
  - name: withdrawals
    description: Withdrawal related endpoints
    x-displayName: Withdrawals
paths:
  /api/users/{id}/deactivate/:
    post:
      tags:
        - Users
      summary: Deactivate a user
      description: >-
        Deactivate a user with an audit reason. By default, the user's trading
        accounts for your firm are also blocked. Set `deactivate_accounts=false`
        to leave trading accounts unchanged.
      operationId: api_users_deactivate_create
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this user.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDeactivationRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UserDeactivationRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UserDeactivationRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    UserDeactivationRequest:
      type: object
      properties:
        reason:
          type: string
          default: Triggered by Admin.
          maxLength: 2000
        deactivate_accounts:
          type: boolean
          default: true
    OperationResponse:
      type: object
      description: >-
        Standard serializer for operation responses. A command or a task should
        return a response matching this format.

        Operation = a request to perform some action, e.g. sync, update, delete,
        create, etc.
      properties:
        success:
          type: boolean
          description: Indicates whether the operation completed successfully.
        results:
          type: array
          items: {}
          description: >-
            List containing the result items produced by the operation. The
            structure of each item depends on the executed operation.
        summary:
          type: object
          additionalProperties: {}
          description: >-
            Aggregated summary information about the operation results (e.g.
            counts of updated, created, failed or unchanged records).
        duration_ms:
          type: number
          format: double
          description: Execution time of the operation in milliseconds.
        message:
          type: string
          nullable: true
          description: Optional human-readable message describing the operation outcome.
      required:
        - duration_ms
        - results
        - success
        - summary
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.