> ## Documentation Index
> Fetch the complete documentation index at: https://docs.itoflow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a strategy

> Updates an existing user-owned strategy.

Operation ID: put__strategies_id_.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json put /strategies/{id}
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /strategies/{id}:
    put:
      tags:
        - Strategies
      summary: Update a strategy
      description: |-
        Updates an existing user-owned strategy.

        Operation ID: put__strategies_id_.
      operationId: put__strategies_id_
      parameters:
        - description: Resource UUID
          in: path
          name: id
          required: true
          schema:
            description: Resource UUID
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StrategyUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateStrategyResponse'
          description: Strategy updated
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Validation error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Strategy not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Version conflict
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Server error
      security:
        - bearerAuth: []
components:
  schemas:
    StrategyUpdateRequest:
      properties:
        allocationGuidance:
          allOf:
            - $ref: '#/components/schemas/AllocationGuidanceRequest'
            - description: >-
                Canonical market_based allocation guidance. Select at least one
                market, asset class, sector, or included symbol; universe is an
                alternative source of included symbols.
        changeDescription:
          type: string
        constraints:
          properties:
            allowed_exchanges:
              items:
                type: string
              type:
                - array
                - 'null'
            blocked_symbols:
              items:
                type: string
              type:
                - array
                - 'null'
            is_strict:
              type: boolean
            max_drawdown_pct:
              type: number
            max_position_pct:
              type: number
            max_positions:
              type: integer
            min_cash_pct:
              type: number
            min_position_pct:
              type: number
            stop_loss_pct:
              type:
                - number
                - 'null'
            stop_on_drawdown:
              type: boolean
          type: object
        description:
          type:
            - string
            - 'null'
        expectedVersion:
          type: integer
        initial_capital: {}
        initialCapital: {}
        name:
          type: string
        rules:
          properties:
            lookback_days:
              type: integer
            model_key:
              enum:
                - luna
                - sol
                - sol61
                - astra
                - sonnet55
                - opus55
                - terra61
                - haiku55
                - fusion_deep
                - fusion_quick
                - fusion_light
              type: string
            rebalance_frequency:
              enum:
                - daily
                - weekly
                - monthly
              type: string
            rebalance_time_utc:
              type: string
          type: object
        strategyContent:
          type: string
        universe:
          items:
            type: string
          type: array
      type: object
    UpdateStrategyResponse:
      properties:
        id:
          format: uuid
          type: string
        name:
          type: string
        updatedAt:
          type: string
        versionId:
          format: uuid
          type:
            - string
            - 'null'
        versionNumber:
          type: integer
      required:
        - id
        - name
        - updatedAt
        - versionId
        - versionNumber
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    AllocationGuidanceRequest:
      description: >-
        Provide at least one market, asset class, sector, or included symbol
        here or through universe. Required to select a tradable scope even
        though this field is conditionally optional.
      properties:
        asset_classes:
          items:
            type: string
          type: array
        created_at:
          type: string
        is_strict:
          type: boolean
        markets:
          items:
            type: string
          type: array
        notes:
          type: string
        pattern:
          enum:
            - market_based
          type: string
        sectors:
          items:
            type: string
          type: array
        symbols_avoid:
          items:
            type: string
          type: array
        symbols_include:
          items:
            type: string
          type: array
      required:
        - pattern
      type: object
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

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