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

# Deactivate a trading account

> Turn off a trading account. The account moves to `inactive` status: it cannot trade and is not billed from the next calendar month. Use this when a trader hasn't traded and a new month is about to start.

**What happens:**
1. Working orders are cancelled
2. Open positions are closed at market
3. The account status becomes `inactive`
4. The account stops counting toward your active trader bill

**Requirements:** The account must be `in_progress` or `not_started`. Already passed, failed, or expired accounts cannot be deactivated.

**Webhooks:** `account.status_changed` fires with `trigger: "firm_deactivated"` and the reason you provided.

**Idempotent:** Calling deactivate on an already-inactive account returns success with `changed: false`.

**Example:**
```bash
curl -X POST ".../v1/organization/trading-accounts/7c9e6679-7425-40de-944b-e07fc1f90ae7/deactivate" \
  -H "X-API-Key: hp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Inactive for 14 days before month end" }'
```



## OpenAPI

````yaml /api-reference/openapi.json post /v1/organization/trading-accounts/{accountId}/deactivate
openapi: 3.0.0
info:
  title: Hyperprop Platform API
  version: 1.0.0
  description: >-
    REST API for the Hyperprop Trading Platform — provision evaluation and
    funded trading accounts, manage traders and plans, react to account
    lifecycle events via signed webhooks, and reconcile billing. Built for prop
    firms integrating from their own backend.


    Authentication, quick start, error handling, idempotency, pagination, custom
    metadata, webhooks, and the MCP connector are documented at
    https://docs.hyperprop.com.
  x-logo:
    url: https://app.hyperprop.com/logo-icon.svg
    altText: Hyperprop
    href: https://hyperprop.com
servers:
  - url: https://api.hyperprop.com/platform
    description: Production
security: []
tags:
  - name: Trading accounts
    description: Create, update, and inspect trading accounts.
  - name: Traders
    description: Look up and update the traders in your organization.
  - name: Trading plans
    description: Define the plans you sell.
  - name: Trading rules
    description: Define how accounts are evaluated.
  - name: Lockouts
    description: Pause and resume trading on an account.
  - name: Payouts
    description: Check payout eligibility and record payouts.
  - name: Purchases
    description: Purchases recorded for your organization.
  - name: Time Machine
    description: Restore accounts to an earlier trading day or instant.
  - name: Webhooks
    description: Register webhook endpoints and inspect deliveries.
  - name: Events
    description: Your organization's event history and real-time event stream.
  - name: Reconciliation
    description: Balances, end-of-day snapshots, and fills for reconciliation.
  - name: Analytics
    description: Organization performance and plan economics.
  - name: Billing
    description: 'Your Hyperprop bill: activity, billing cycles, and forecasts.'
  - name: Team and roles
    description: Manage dashboard access for your staff.
  - name: API keys
    description: Manage your organization's API key.
  - name: Logs and health
    description: API request logs, the audit log, and integration health.
  - name: Organization profile
    description: Your organization's profile and logo.
  - name: Support
    description: Open and follow up on support tickets.
  - name: Partner access
    description: >-
      Read a trader's journal as an approved partner app, with the trader's own
      key.
paths:
  /v1/organization/trading-accounts/{accountId}/deactivate:
    post:
      tags:
        - Trading accounts
      summary: Deactivate a trading account
      description: >-
        Turn off a trading account. The account moves to `inactive` status: it
        cannot trade and is not billed from the next calendar month. Use this
        when a trader hasn't traded and a new month is about to start.


        **What happens:**

        1. Working orders are cancelled

        2. Open positions are closed at market

        3. The account status becomes `inactive`

        4. The account stops counting toward your active trader bill


        **Requirements:** The account must be `in_progress` or `not_started`.
        Already passed, failed, or expired accounts cannot be deactivated.


        **Webhooks:** `account.status_changed` fires with `trigger:
        "firm_deactivated"` and the reason you provided.


        **Idempotent:** Calling deactivate on an already-inactive account
        returns success with `changed: false`.


        **Example:**

        ```bash

        curl -X POST
        ".../v1/organization/trading-accounts/7c9e6679-7425-40de-944b-e07fc1f90ae7/deactivate"
        \
          -H "X-API-Key: hp_live_your_key_here" \
          -H "Content-Type: application/json" \
          -d '{ "reason": "Inactive for 14 days before month end" }'
        ```
      operationId: postV1OrganizationTradingAccountsAccountidDeactivate
      parameters:
        - name: accountId
          in: path
          required: true
          description: Trading account ID
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: Reason for deactivating (shown in webhooks and audit log)
                  example: Inactive for 14 days before month end
      responses:
        '200':
          description: Account deactivated (or already inactive)
          content:
            application/json:
              schema:
                type: object
                properties:
                  changed:
                    type: boolean
                    description: true if the status changed, false if already inactive
                  status:
                    type: string
                    description: New account status
                    example: inactive
        '409':
          description: Account cannot be deactivated (passed, failed, or expired)
        '502':
          description: Engine unavailable or flatten incomplete — retry
      security:
        - X-API-Key: []
components:
  securitySchemes:
    X-API-Key:
      type: apiKey
      name: X-API-Key
      in: header
      description: >-
        Organization API key. Format: "hp_live_{key}". Organization admins
        manage the key in the dashboard.

````

## Related topics

- [Reactivate a trading account](/platform-api/trading-accounts/reactivate-a-trading-account.md)
- [Create a trading account](/platform-api/trading-accounts/create-a-trading-account.md)
- [Update a trading account](/platform-api/trading-accounts/update-a-trading-account.md)
- [Get a specific trading account](/platform-api/trading-accounts/get-a-specific-trading-account.md)
- [Bulk update trading accounts](/platform-api/trading-accounts/bulk-update-trading-accounts.md)


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