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

# Reverse a mass credit

> Takes back the credits a credit job applied: each applied, not yet reversed credit is debited by the same amount, with the same daily-P&L and high-water-mark treatment, as a reversal job. A credit is reversed at most once; a reversal item that fails is retried on its own job (`POST /organization/jobs/{jobId}/retry`).

A reversal lowers the balance like any debit, so it can bring an account to its loss limits. Passed, failed or expired accounts are not debited (`ACCOUNT_CLOSED`). The credit job must have finished (or been cancelled).

Send `preview: true` to see how many credits, and how much, would be reversed.

Requires **manage** permission on traders.

```bash
curl -X POST "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/jobs/5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60/reverse" \
  -H "X-API-Key: hp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Credited in error"}'
```



## OpenAPI

````yaml https://api.hyperprop.com/platform/openapi.json post /v1/organization/balance-adjustments/jobs/{jobId}/reverse
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: Mass credit
    description: >-
      Credit back losses across many accounts after an incident, as background
      jobs you can follow, pause, export and reverse.
  - 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, integration health, and idempotency key
      recovery.
  - 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/balance-adjustments/jobs/{jobId}/reverse:
    post:
      tags:
        - Mass credit
      summary: Reverse a mass credit
      description: >-
        Takes back the credits a credit job applied: each applied, not yet
        reversed credit is debited by the same amount, with the same daily-P&L
        and high-water-mark treatment, as a reversal job. A credit is reversed
        at most once; a reversal item that fails is retried on its own job
        (`POST /organization/jobs/{jobId}/retry`).


        A reversal lowers the balance like any debit, so it can bring an account
        to its loss limits. Passed, failed or expired accounts are not debited
        (`ACCOUNT_CLOSED`). The credit job must have finished (or been
        cancelled).


        Send `preview: true` to see how many credits, and how much, would be
        reversed.


        Requires **manage** permission on traders.


        ```bash

        curl -X POST
        "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/jobs/5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60/reverse"
        \
          -H "X-API-Key: hp_live_your_key_here" \
          -H "Content-Type: application/json" \
          -d '{"reason": "Credited in error"}'
        ```
      operationId: postV1OrganizationBalanceadjustmentsJobsJobidReverse
      parameters:
        - x-format:
            guid: true
          name: jobId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model1238'
      responses:
        '200':
          description: 'Preview - What would be reversed (with `preview: true`)'
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1240'
        '202':
          description: Accepted - The reversal job is queued
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1241'
        '400':
          description: >-
            Bad Request - `VALIDATION_ERROR`, `TOO_MANY_ACCOUNTS`,
            `INVALID_ACCOUNT_IDS`, `ACCOUNTS_NOT_CREDITED`
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1243'
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model11'
        '403':
          description: >-
            Forbidden - The caller lacks traders:manage
            (`INSUFFICIENT_PERMISSIONS`)
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1244'
        '404':
          description: Job not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model446'
        '409':
          description: Conflict - `JOB_ACTIVE`, `REVERSAL_RUNNING`, `NOTHING_TO_REVERSE`
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1246'
        '500':
          description: An unexpected error occurred
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model6'
        '503':
          description: Mass credit is not available yet; nothing was changed
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model144'
      security:
        - X-API-Key: []
components:
  schemas:
    Model1238:
      type: object
      properties:
        reason:
          type: string
          example: Credited in error
          minLength: 3
          maxLength: 200
          x-convert:
            trim: true
        accountIds:
          $ref: '#/components/schemas/Model1237'
        preview:
          type: boolean
          default: false
      required:
        - reason
    Model1240:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/Model1239'
    Model1241:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/Model139'
    Model1243:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Some accounts did not receive a credit in this batch
        code:
          $ref: '#/components/schemas/Model1242'
    Model11:
      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
    Model1244:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: Insufficient permissions
        code:
          $ref: '#/components/schemas/code'
    Model446:
      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: Job not found
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: JOB_NOT_FOUND
    Model1246:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: number
          example: 409
        error:
          type: string
          example: Conflict
        message:
          type: string
          example: A reversal of this credit is already running
        code:
          $ref: '#/components/schemas/Model1245'
    Model6:
      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
    Model144:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 503
        error:
          type: string
          example: Error
        message:
          type: string
          example: Mass credit is not available yet; nothing was changed
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: FEATURE_NOT_READY
    Model1237:
      type: array
      description: Reverse only these accounts' credits; all of them when omitted
      example:
        - 7c9e6679-7425-40de-944b-e07fc1f90ae7
      minItems: 1
      maxItems: 10000
      items:
        type: string
        x-format:
          guid: true
    Model1239:
      type: object
      properties:
        preview:
          type: boolean
        accounts:
          type: integer
        totalAmount:
          type: number
    Model139:
      type: object
      properties:
        id:
          type: string
          example: 5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60
          x-format:
            guid: true
        kind:
          $ref: '#/components/schemas/Model134'
        type:
          $ref: '#/components/schemas/type'
        state:
          $ref: '#/components/schemas/Model135'
        parentJobId:
          type: string
          description: A credit's preview, or a reversal's credit
          x-format:
            guid: true
        createdBy:
          type: string
          example: ops@yourfirm.com
        createdAt:
          type: string
        startedAt:
          type: string
        finishedAt:
          type: string
        heartbeatAt:
          type: string
        progress:
          $ref: '#/components/schemas/progress'
        summary:
          $ref: '#/components/schemas/Model136'
        lastError:
          type: string
        rules:
          $ref: '#/components/schemas/rules'
        selection:
          $ref: '#/components/schemas/selection'
        templateId:
          type: string
          x-format:
            guid: true
        expiresAt:
          type: string
          description: 'Preview: confirm before this time'
        batchId:
          type: string
          description: 'Credit/reversal: the batch recorded on every adjustment'
          x-format:
            guid: true
        tag:
          type: string
        reason:
          type: string
        previewJobId:
          type: string
          x-format:
            guid: true
        applyJobId:
          type: string
          x-format:
            guid: true
        expected:
          $ref: '#/components/schemas/expected'
    Model1242:
      type: string
      example: VALIDATION_ERROR
      enum:
        - VALIDATION_ERROR
        - TOO_MANY_ACCOUNTS
        - INVALID_ACCOUNT_IDS
        - ACCOUNTS_NOT_CREDITED
    code:
      type: string
      example: INSUFFICIENT_PERMISSIONS
      enum:
        - INSUFFICIENT_PERMISSIONS
    Model1245:
      type: string
      example: JOB_ACTIVE
      enum:
        - JOB_ACTIVE
        - REVERSAL_RUNNING
        - NOTHING_TO_REVERSE
    Model134:
      type: string
      example: mass_credit.preview
      enum:
        - mass_credit.preview
        - mass_credit.apply
        - mass_credit.reversal
    type:
      type: string
      example: preview
      enum:
        - preview
        - credit
        - reversal
    Model135:
      type: string
      description: >-
        `draft`: a list preview still taking accounts. `completed_with_errors`:
        finished, some items failed (retry them). `failed`: the job could not go
        on (`lastError`).
      example: running
      enum:
        - draft
        - queued
        - running
        - paused
        - cancelling
        - cancelled
        - completed
        - completed_with_errors
        - failed
    progress:
      type: object
      properties:
        total:
          type: integer
          example: 120000
        processed:
          type: integer
          example: 48200
        succeeded:
          type: integer
          description: 'Preview: accounts to credit. Credit/reversal: adjustments applied.'
          example: 9100
        failed:
          type: integer
          example: 0
        skipped:
          type: integer
          description: 'Preview: accounts left out (see `summary.skip_*`).'
          example: 39100
        planning:
          type: boolean
          description: >-
            The selection is still being expanded; `total` grows until this is
            false.
          example: false
        percent:
          type: number
          example: 40.2
    Model136:
      type: object
      description: >-
        Running totals. Preview: `credits`, `creditAmount` (send it back as
        `expectedTotalAmount`), `lossAmount`, `capped`, `warnings`,
        `skip_<REASON>`. Credit/reversal: `applied`, `appliedAmount`, `failed`,
        `failedAmount`, `duplicates`, `failed_<CODE>`.
      example:
        credits: 9100
        creditAmount: 1830220.5
        lossAmount: 1902118.25
        capped: 120
        warnings: 14
        skip_ACCOUNT_CLOSED: 30000
        skip_NO_FILLS: 9100
    rules:
      type: object
      description: >-
        How the credit is computed. Every field is optional (a template or the
        defaults fill the rest), except the window, which the request or the
        template must give.
      properties:
        windowStart:
          type: string
          format: date-time
          description: Start of the incident window (inclusive), ISO 8601
          example: '2026-10-21T13:30:00Z'
        windowEnd:
          type: string
          format: date-time
          description: >-
            End of the window (exclusive). Must be in the past; at most 7 days
            after `windowStart`.
          example: '2026-10-21T14:15:00Z'
        lossBasis:
          $ref: '#/components/schemas/Model137'
        includeFees:
          type: boolean
          description: 'Default `true`: fees and commission count as part of the loss.'
          example: true
        maxCreditPerAccount:
          type: number
          description: Largest credit per account. No cap by default.
          example: null
          x-constraint:
            precision: 2
            sign: positive
        minCreditPerAccount:
          type: number
          description: >-
            Smallest credit paid; smaller losses are skipped (`BELOW_MINIMUM`).
            None by default.
          example: null
          x-constraint:
            precision: 2
            sign: positive
        countTowardDailyPnl:
          type: boolean
          description: >-
            Default `false`: the day's starting balance moves with the credit,
            so it does not count as that day's profit (the daily loss limit
            stays where it was). `true`: the credit counts toward the day's P&L.
          example: false
        moveHighWaterMark:
          type: boolean
          description: >-
            Default `false`: the high-water mark (trailing drawdown peak) stays
            where it is. `true`: it moves up with the credit.
          example: false
        requireFlat:
          type: boolean
          description: >-
            Default `false`. `true`: accounts holding positions or working
            orders when the credit lands fail with `OPEN_EXPOSURE` (retry them
            later).
          example: false
        skipAlreadyCredited:
          type: boolean
          description: >-
            Default `true`: leave out accounts already credited, and not
            reversed, for an overlapping window.
          example: true
    selection:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/mode'
        filters:
          $ref: '#/components/schemas/Model138'
      required:
        - mode
        - filters
    expected:
      type: object
      properties:
        accounts:
          type: integer
        totalAmount:
          type: number
    Model137:
      type: string
      description: >-
        `net` (default): the window's net P&L, when it is a loss.
        `gross_losers`: the total of the losing round trips that ended in the
        window; winning trades are not netted against them.
      example: net
      enum:
        - net
        - gross_losers
    mode:
      type: string
      description: >-
        `all`: every account of the organization. `list`: the accounts you send
        (ids or account numbers). `filter`: accounts matching `filters`.
      example: all
      enum:
        - all
        - list
        - filter
    Model138:
      type: object
      properties:
        planIds:
          $ref: '#/components/schemas/planIds'
        statuses:
          $ref: '#/components/schemas/statuses'
        types:
          $ref: '#/components/schemas/types'
        createdFrom:
          type: string
          format: date-time
          description: Accounts created at or after
        createdTo:
          type: string
          format: date-time
          description: Accounts created before
    planIds:
      type: array
      description: Trading plans the account was bought on
      maxItems: 100
      items:
        type: string
        x-format:
          guid: true
    statuses:
      type: array
      description: Account statuses
      example:
        - in_progress
      maxItems: 20
      items:
        type: string
        maxLength: 40
    types:
      type: array
      description: Account types
      example:
        - evaluation
      maxItems: 20
      items:
        type: string
        maxLength: 40
  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

- [Reverse a balance credit](https://docs.hyperprop.com/platform-api/mass-credit/reverse-a-balance-credit.md)
- [Confirm a mass credit](https://docs.hyperprop.com/platform-api/mass-credit/confirm-a-mass-credit.md)
- [Preview a mass credit](https://docs.hyperprop.com/platform-api/mass-credit/preview-a-mass-credit.md)
- [List mass credit templates](https://docs.hyperprop.com/platform-api/mass-credit/list-mass-credit-templates.md)
- [Delete a mass credit template](https://docs.hyperprop.com/platform-api/mass-credit/delete-a-mass-credit-template.md)


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