> ## 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.

# Unlink a trader (issues a fresh import key)

> Detach the trader from an account **before trading starts** — wrong customer, refund, resale, or a mistaken import.

**What happens:**
1. The trader is detached (`userId` back to `null`)
2. The old import key is **voided forever** and a **fresh key is issued** (returned in the response and in the webhook)
3. An `account.unlinked` webhook fires with the unlinked trader's email, the voided key, and the new key

**Soulbound bindings are NOT released by unlink.** If the account's `customerId` is bound to a Hyperprop login, the fresh key can still only be redeemed by that same login. That's intentional — the binding belongs to the *customer*, not the account. Two follow-ups depending on why you're unlinking:
- **Resold to a different customer** → change the account's `customerId` to the new customer's ID (`PATCH /trading-accounts/{accountId}`), then hand over the fresh key.
- **Same customer, lost Hyperprop login** → rebind the customer to their new login (`POST /trader-bindings/{bindingId}/rebind`) — the fresh key then becomes redeemable by the new login, and any still-active accounts on the old login are failed.

**When it's refused — `409 ACCOUNT_ALREADY_STARTED`:**
Only `not_started` accounts with zero order history can be unlinked. Once a trader has placed trades there is history, journal data, and snapshots that belong to them — unlinking would orphan all of it. Handle post-start situations with account status changes (`PATCH /trading-accounts/{accountId}/status`) instead.

Note: if the import had already started a billing cycle, that cycle is not reversed — the new redemption of the fresh key will not double-bill inside the same cycle window.

**Permissions:** organization **admins** only.

**Error codes:** `ACCOUNT_NOT_FOUND`, `NOT_LINKED`, `ACCOUNT_ALREADY_STARTED`, `UNLINK_ERROR`.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/organization/trading-accounts/{accountId}/unlink
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}/unlink:
    post:
      tags:
        - Trading accounts
      summary: Unlink a trader (issues a fresh import key)
      description: >-
        Detach the trader from an account **before trading starts** — wrong
        customer, refund, resale, or a mistaken import.


        **What happens:**

        1. The trader is detached (`userId` back to `null`)

        2. The old import key is **voided forever** and a **fresh key is
        issued** (returned in the response and in the webhook)

        3. An `account.unlinked` webhook fires with the unlinked trader's email,
        the voided key, and the new key


        **Soulbound bindings are NOT released by unlink.** If the account's
        `customerId` is bound to a Hyperprop login, the fresh key can still only
        be redeemed by that same login. That's intentional — the binding belongs
        to the *customer*, not the account. Two follow-ups depending on why
        you're unlinking:

        - **Resold to a different customer** → change the account's `customerId`
        to the new customer's ID (`PATCH /trading-accounts/{accountId}`), then
        hand over the fresh key.

        - **Same customer, lost Hyperprop login** → rebind the customer to their
        new login (`POST /trader-bindings/{bindingId}/rebind`) — the fresh key
        then becomes redeemable by the new login, and any still-active accounts
        on the old login are failed.


        **When it's refused — `409 ACCOUNT_ALREADY_STARTED`:**

        Only `not_started` accounts with zero order history can be unlinked.
        Once a trader has placed trades there is history, journal data, and
        snapshots that belong to them — unlinking would orphan all of it. Handle
        post-start situations with account status changes (`PATCH
        /trading-accounts/{accountId}/status`) instead.


        Note: if the import had already started a billing cycle, that cycle is
        not reversed — the new redemption of the fresh key will not double-bill
        inside the same cycle window.


        **Permissions:** organization **admins** only.


        **Error codes:** `ACCOUNT_NOT_FOUND`, `NOT_LINKED`,
        `ACCOUNT_ALREADY_STARTED`, `UNLINK_ERROR`.
      operationId: postV1OrganizationTradingaccountsAccountidUnlink
      parameters:
        - description: Trading account ID
          x-format:
            guid: true
          name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success - trader unlinked, fresh key issued
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model753'
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model9'
        '403':
          description: Only organization admins can perform this action
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model570'
        '404':
          description: Account not found in your organization
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model754'
        '409':
          description: >-
            Account has already started trading — unlinking would orphan the
            trader's history
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model755'
        '500':
          description: An unexpected error occurred
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model5'
      security:
        - X-API-Key: []
components:
  schemas:
    Model753:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: >-
            Trader unlinked — a fresh import key was issued (the old key is
            void)
        data:
          $ref: '#/components/schemas/Model752'
    Model9:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication required
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: UNAUTHORIZED
    Model570:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: Only organization admins can perform this action
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: NOT_ADMIN
    Model754:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 404
        error:
          type: string
          example: Not Found
        message:
          type: string
          example: Account not found in your organization
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: ACCOUNT_NOT_FOUND
    Model755:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 409
        error:
          type: string
          example: Conflict
        message:
          type: string
          example: >-
            Account has already started trading — unlinking would orphan the
            trader's history
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: ACCOUNT_ALREADY_STARTED
    Model5:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: Internal Server Error
        message:
          type: string
          example: An unexpected error occurred
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: INTERNAL_ERROR
    Model752:
      type: object
      properties:
        id:
          type: string
          description: Account ID
        userId:
          type: string
          description: Always null after unlink
        unlinkedUserId:
          type: string
          description: Hyperprop user that was detached
        unlinkedEmail:
          type: string
          description: Their email, for your records
        importKey:
          type: string
          description: The NEW one-time import key (the old one is void)
          example: HP-9WM4T-K2XQ7-3RFPD
  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

- [Bulk-create unlinked accounts with import keys](/platform-api/trading-accounts/bulk-create-unlinked-accounts-with-import-keys.md)
- [Rebind a customer to a new Hyperprop login (support flow)](/platform-api/traders/rebind-a-customer-to-a-new-hyperprop-login-support-flow.md)
- [Create a trading account](/platform-api/trading-accounts/create-a-trading-account.md)
- [Register a webhook endpoint](/platform-api/webhooks/register-a-webhook-endpoint.md)
- [List trader identity bindings (customer ⇄ Hyperprop login)](/platform-api/traders/list-trader-identity-bindings-customer-⇄-hyperprop-login.md)


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