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

# Update a trading plan

> Update an existing trading plan. **Admin only**.

Only provide fields you want to change.

**Example - Update price:**
```bash
curl -X PATCH "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}" \
  -H "X-API-Key: hp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"price": 349}'
```

**Example - Deactivate plan:**
```bash
curl -X PATCH ".../{planId}" \
  -d '{"isActive": false}'
```

**Example - Change trading rule:**
```bash
curl -X PATCH ".../{planId}" \
  -d '{"tradingRuleId": "new-rule-uuid"}'
```

**Note:** Existing purchases are not affected by changes. Changes only apply to new purchases.

**Error Codes:**
| Code | Description |
|------|-------------|
| `PLAN_NOT_FOUND` | No plan exists with this ID |
| `PLAN_NOT_IN_ORG` | Plan belongs to different organization |
| `PLAN_NAME_EXISTS` | Another plan already has this name |
| `RULE_NOT_FOUND` | New trading rule not found |
| `RULE_NOT_IN_ORG` | New trading rule belongs to different org |
| `NO_FIELDS_TO_UPDATE` | No valid fields provided |
| `ADMIN_REQUIRED` | Only admins can update plans |



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/organization/trading-plans/{planId}
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-plans/{planId}:
    patch:
      tags:
        - Trading plans
      summary: Update a trading plan
      description: >-
        Update an existing trading plan. **Admin only**.


        Only provide fields you want to change.


        **Example - Update price:**

        ```bash

        curl -X PATCH
        "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}"
        \
          -H "X-API-Key: hp_live_your_key_here" \
          -H "Content-Type: application/json" \
          -d '{"price": 349}'
        ```


        **Example - Deactivate plan:**

        ```bash

        curl -X PATCH ".../{planId}" \
          -d '{"isActive": false}'
        ```


        **Example - Change trading rule:**

        ```bash

        curl -X PATCH ".../{planId}" \
          -d '{"tradingRuleId": "new-rule-uuid"}'
        ```


        **Note:** Existing purchases are not affected by changes. Changes only
        apply to new purchases.


        **Error Codes:**

        | Code | Description |

        |------|-------------|

        | `PLAN_NOT_FOUND` | No plan exists with this ID |

        | `PLAN_NOT_IN_ORG` | Plan belongs to different organization |

        | `PLAN_NAME_EXISTS` | Another plan already has this name |

        | `RULE_NOT_FOUND` | New trading rule not found |

        | `RULE_NOT_IN_ORG` | New trading rule belongs to different org |

        | `NO_FIELDS_TO_UPDATE` | No valid fields provided |

        | `ADMIN_REQUIRED` | Only admins can update plans |
      operationId: patchV1OrganizationTradingplansPlanid
      parameters:
        - description: The plan ID to update
          x-format:
            guid: true
          name: planId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model913'
      responses:
        '200':
          description: Plan updated successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model915'
        '400':
          description: Bad Request - No valid fields to update
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model916'
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model9'
        '403':
          description: Forbidden - Admin required or plan/rule not in org
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model917'
        '404':
          description: Not Found - Plan or rule not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model918'
        '409':
          description: Conflict - Plan name already exists
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model919'
        '500':
          description: An unexpected error occurred
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model5'
      security:
        - X-API-Key: []
components:
  schemas:
    Model913:
      type: object
      properties:
        name:
          type: string
          description: New plan name (must be unique)
          example: Updated Plan Name
        description:
          type: string
          description: New description (null to clear)
          example: Updated description
        price:
          type: number
          description: New price
          example: 349
        currency:
          type: string
          description: New currency code
          example: EUR
        durationDays:
          type: number
          description: New duration (null = unlimited)
          example: 45
        accountSize:
          type: number
          description: New account size
          example: 150000
        tradingRuleId:
          type: string
          description: New trading rule ID
          x-format:
            guid: true
        isActive:
          type: boolean
          description: Enable/disable plan
        metadata:
          $ref: '#/components/schemas/Model912'
        mergeMetadata:
          type: boolean
          description: >-
            When true, the provided metadata keys are merged into the existing
            metadata instead of replacing it entirely
          example: true
    Model915:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Trading plan updated successfully
        data:
          $ref: '#/components/schemas/Model914'
    Model916:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: No valid fields to update
        code:
          type: string
          example: NO_FIELDS_TO_UPDATE
    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
    Model917:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: This plan does not belong to your organization
        code:
          type: string
          example: PLAN_NOT_IN_ORG
    Model918:
      type: object
      properties:
        statusCode:
          type: number
          example: 404
        error:
          type: string
          example: Not Found
        message:
          type: string
          example: Trading plan not found
        code:
          type: string
          example: PLAN_NOT_FOUND
    Model919:
      type: object
      properties:
        statusCode:
          type: number
          example: 409
        error:
          type: string
          example: Conflict
        message:
          type: string
          example: A trading plan with this name already exists
        code:
          type: string
          example: PLAN_NAME_EXISTS
    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
    Model912:
      type: object
      description: >-
        New metadata. Replaces existing metadata wholesale unless mergeMetadata
        is true.
      example:
        featured: false
    Model914:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          example: Updated Plan Name
        price:
          type: number
          example: 349
        isActive:
          type: boolean
          example: true
        updatedAt:
          type: string
          example: '2025-02-17T14:30:00.000Z'
  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

- [Update a trading rule](/platform-api/trading-rules/update-a-trading-rule.md)
- [Bulk update trading accounts](/platform-api/trading-accounts/bulk-update-trading-accounts.md)
- [Delete a trading plan](/platform-api/trading-plans/delete-a-trading-plan.md)
- [Update a trading account](/platform-api/trading-accounts/update-a-trading-account.md)
- [Get a specific trading plan](/platform-api/trading-plans/get-a-specific-trading-plan.md)


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