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

# Create a mass credit template

> Saves a set of rules (and optionally account filters) under a name, to start previews from. Names are unique per organization.

Requires **manage** permission on traders.

```bash
curl -X POST "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates" \
  -H "X-API-Key: hp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Outage - net loss, cap 1000", "rules": {"lossBasis": "net", "maxCreditPerAccount": 1000}}'
```



## OpenAPI

````yaml https://api.hyperprop.com/platform/openapi.json post /v1/organization/balance-adjustments/templates
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/templates:
    post:
      tags:
        - Mass credit
      summary: Create a mass credit template
      description: >-
        Saves a set of rules (and optionally account filters) under a name, to
        start previews from. Names are unique per organization.


        Requires **manage** permission on traders.


        ```bash

        curl -X POST
        "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/templates"
        \
          -H "X-API-Key: hp_live_your_key_here" \
          -H "Content-Type: application/json" \
          -d '{"name": "Outage - net loss, cap 1000", "rules": {"lossBasis": "net", "maxCreditPerAccount": 1000}}'
        ```
      operationId: postV1OrganizationBalanceadjustmentsTemplates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model991'
      responses:
        '201':
          description: Created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model992'
        '400':
          description: >-
            Bad Request - `VALIDATION_ERROR`, `INVALID_RULES`, `INVALID_WINDOW`,
            `INVALID_SELECTION`
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model994'
        '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/Model995'
        '409':
          description: Conflict - `TEMPLATE_EXISTS`
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model997'
        '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:
    Model991:
      type: object
      properties:
        name:
          type: string
          example: Platform outage - net loss, capped
          minLength: 1
          maxLength: 80
          x-convert:
            trim: true
        description:
          type: string
          maxLength: 500
          x-convert:
            trim: true
        rules:
          $ref: '#/components/schemas/Model989'
        selection:
          $ref: '#/components/schemas/Model990'
      required:
        - name
        - rules
    Model992:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/Model379'
    Model994:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: '`minCreditPerAccount` cannot be larger than `maxCreditPerAccount`'
        code:
          $ref: '#/components/schemas/Model993'
    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
    Model995:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: Insufficient permissions
        code:
          $ref: '#/components/schemas/code'
    Model997:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: number
          example: 409
        error:
          type: string
          example: Conflict
        message:
          type: string
          example: A template named "Outage" already exists
        code:
          $ref: '#/components/schemas/Model996'
    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
    Model989:
      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/Model988'
        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
    Model990:
      type: object
      description: 'Optional: `all` or `filter` (a template cannot hold an account list)'
      properties:
        mode:
          $ref: '#/components/schemas/mode'
        filters:
          $ref: '#/components/schemas/Model138'
      required:
        - mode
        - filters
    Model379:
      type: object
      properties:
        id:
          type: string
          example: 3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c
          x-format:
            guid: true
        name:
          type: string
          example: Platform outage - net loss, capped
        description:
          type: string
        rules:
          $ref: '#/components/schemas/Model378'
        selection:
          $ref: '#/components/schemas/selection'
        createdBy:
          type: string
          example: ops@yourfirm.com
        updatedBy:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
    Model993:
      type: string
      example: VALIDATION_ERROR
      enum:
        - VALIDATION_ERROR
        - INVALID_RULES
        - INVALID_WINDOW
        - INVALID_SELECTION
    code:
      type: string
      example: INSUFFICIENT_PERMISSIONS
      enum:
        - INSUFFICIENT_PERMISSIONS
    Model996:
      type: string
      example: TEMPLATE_EXISTS
      enum:
        - TEMPLATE_EXISTS
    Model988:
      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
    Model378:
      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/Model377'
        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
    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
    Model377:
      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
  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

- [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)
- [Update a mass credit template](https://docs.hyperprop.com/platform-api/mass-credit/update-a-mass-credit-template.md)
- [Preview a mass credit](https://docs.hyperprop.com/platform-api/mass-credit/preview-a-mass-credit.md)
- [Confirm a mass credit](https://docs.hyperprop.com/platform-api/mass-credit/confirm-a-mass-credit.md)


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