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

# Cancel a bulk job

> Cancels a job: items in flight finish, the rest are not processed (they read as `cancelled`). Credits already applied stay applied; reverse them if needed. A cancelled credit cannot be resumed.

Requires **manage** permission on traders.

```bash
curl -X POST "https://api.hyperprop.com/platform/v1/organization/jobs/5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60/cancel" \
  -H "X-API-Key: hp_live_your_key_here"
```



## OpenAPI

````yaml https://api.hyperprop.com/platform/openapi.json post /v1/organization/jobs/{jobId}/cancel
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/jobs/{jobId}/cancel:
    post:
      tags:
        - Mass credit
      summary: Cancel a bulk job
      description: >-
        Cancels a job: items in flight finish, the rest are not processed (they
        read as `cancelled`). Credits already applied stay applied; reverse them
        if needed. A cancelled credit cannot be resumed.


        Requires **manage** permission on traders.


        ```bash

        curl -X POST
        "https://api.hyperprop.com/platform/v1/organization/jobs/5d1c7a2e-3b4f-4c8d-9e0a-1b2c3d4e5f60/cancel"
        \
          -H "X-API-Key: hp_live_your_key_here"
        ```
      operationId: postV1OrganizationJobsJobidCancel
      parameters:
        - x-format:
            guid: true
          name: jobId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Job
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1131'
        '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/Model1132'
        '404':
          description: Job not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model446'
        '409':
          description: Conflict - `INVALID_JOB_STATE`
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model1134'
        '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:
    Model1131:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Model139'
    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
    Model1132:
      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
    Model1134:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: number
          example: 409
        error:
          type: string
          example: Conflict
        message:
          type: string
          example: The job cannot be paused while it is completed
        code:
          $ref: '#/components/schemas/Model1133'
    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
    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'
    code:
      type: string
      example: INSUFFICIENT_PERMISSIONS
      enum:
        - INSUFFICIENT_PERMISSIONS
    Model1133:
      type: string
      example: INVALID_JOB_STATE
      enum:
        - INVALID_JOB_STATE
    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

- [List bulk jobs](https://docs.hyperprop.com/platform-api/mass-credit/list-bulk-jobs.md)
- [Resume a bulk job](https://docs.hyperprop.com/platform-api/mass-credit/resume-a-bulk-job.md)
- [Get a bulk job](https://docs.hyperprop.com/platform-api/mass-credit/get-a-bulk-job.md)
- [Pause a bulk job](https://docs.hyperprop.com/platform-api/mass-credit/pause-a-bulk-job.md)
- [List a bulk job's items](https://docs.hyperprop.com/platform-api/mass-credit/list-a-bulk-jobs-items.md)


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