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

# Change a CARF rule



## OpenAPI

````yaml /api-reference/platform-api.json patch /v2/workflows/{workflowId}/carf/rules/{ruleId}
openapi: 3.0.0
info:
  title: Range Platform API
  description: >-
    The Range Platform API for workspace management, counterparties, and
    operational tooling.
  version: 1.7.37
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
  - Authorization: []
tags:
  - name: Address Information
    description: Get information about a crypto address.
  - name: Transfer Enrichments
    description: Attach workspace-scoped notes and categories to transfers.
  - name: Counterparties
    description: Manage external entities, their addresses, bank accounts, and documents.
  - name: Parties
    description: >-
      The workspace entity register: the firm itself, its clients, and its
      counterparties.
paths:
  /v2/workflows/{workflowId}/carf/rules/{ruleId}:
    patch:
      tags:
        - CARF
      summary: Change a CARF rule
      operationId: updateRule
      parameters:
        - name: workflowId
          required: true
          in: path
          schema:
            type: string
        - name: ruleId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCarfRuleDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarfRuleDto'
components:
  schemas:
    UpdateCarfRuleDto:
      type: object
      properties:
        name:
          type: string
          maxLength: 200
        code:
          type: string
          enum:
            - CARF501
            - CARF502
            - CARF503
            - CARF504
            - CARF505
            - CARF506
            - CARF507
            - CARF508
            - CARF509
            - CARF601
            - CARF602
            - CARF603
            - CARF604
            - CARF605
            - CARF606
        conditions:
          $ref: '#/components/schemas/CarfRuleConditionsDto'
        enabled:
          type: boolean
    CarfRuleDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        code:
          type: string
          enum:
            - CARF501
            - CARF502
            - CARF503
            - CARF504
            - CARF505
            - CARF506
            - CARF507
            - CARF508
            - CARF509
            - CARF601
            - CARF602
            - CARF603
            - CARF604
            - CARF605
            - CARF606
        conditions:
          $ref: '#/components/schemas/CarfRuleConditionsDto'
        enabled:
          type: boolean
        position:
          type: number
          description: Tie-break order; lower first.
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - code
        - conditions
        - enabled
        - position
        - created_at
        - updated_at
    CarfRuleConditionsDto:
      type: object
      properties:
        direction:
          type: string
          enum:
            - in
            - out
        from_wallets:
          description: Sending addresses.
          type: array
          items:
            type: string
        to_wallets:
          description: Receiving addresses.
          type: array
          items:
            type: string
        usd_min:
          type: number
          minimum: 0
        usd_max:
          type: number
          minimum: 0
        token_min:
          type: number
          minimum: 0
          description: Token quantity; needs exactly one asset.
        token_max:
          type: number
          minimum: 0
        assets:
          description: Asset symbols or token contracts (mints).
          type: array
          items:
            type: string
        networks:
          example:
            - eth
            - solana
          type: array
          items:
            type: string
      required:
        - direction
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````

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