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

# Update Step

## Overview

Update an existing step with new data. You can modify basic step information, policies, dependencies, and other configuration options.

## Request Examples

The request body can include various fields depending on what you want to update. Here are common update scenarios:

<CodeGroup>
  ```json Basic Update theme={null}
  {
    "label": "Updated Document Review",
    "description": "Review all submitted contract documents carefully"
  }
  ```

  ```json Update with Policies and Dependencies theme={null}
  {
    "label": "Advanced Document Review",
    "description": "Comprehensive review of contract documents",
    "orderedPolicies": [
      "review-policy-1",
      "approval-policy-2",
      "legal-policy-3"
    ],
    "viewPolicyNames": [
      "viewer-policy",
      "auditor-policy"
    ],
    "webhookUrls": "https://example.com/webhook/review-complete",
    "stepIdsDependencies": [
      "step-123",
      "step-456"
    ],
    "policyNames": [
      "HR",
      "LEGAL",
      "FINANCE"
    ]
  }
  ```

  ```json Update Policy Names theme={null}
  {
    "policyNames": [
      "HR",
      "LEGAL",
      "FINANCE",
      "COMPLIANCE"
    ],
    "orderedPolicies": [
      "data-validation-policy",
      "approval-workflow-policy"
    ]
  }
  ```

  ```json Update Legal Contract Information theme={null}
  {
    "legalContractId": "contract-789",
    "name": "Legal Review Step",
    "description": "Legal department review and approval",
    "orderedPolicies": [
      "legal-compliance-policy",
      "contract-review-policy"
    ]
  }
  ```

  ```json Minimal Field Update theme={null}
  {
    "label": "Quick Update"
  }
  ```

  ```json Clear Policies and Dependencies theme={null}
  {
    "label": "Clean Step Configuration",
    "description": "Step with cleared policies",
    "orderedPolicies": [],
    "viewPolicyNames": [],
    "webhookUrls": null,
    "stepIdsDependencies": [],
    "stepIdsReprovalDependencies": []
  }
  ```

  ```json Update Process Association theme={null}
  {
    "processId": "process-456",
    "label": "Moved to New Process",
    "description": "This step has been moved to a different process"
  }
  ```

  ```json Update Parameters - Basic Fields theme={null}
  {
    "label": "Updated Step with Parameters",
    "parameters": [
      {
        "id": "param-1",
        "name": "fullName",
        "label": "Full Name",
        "type": "TEXT",
        "isRequired": true,
        "isUnique": false
      },
      {
        "id": "param-2",
        "name": "email",
        "label": "Email Address",
        "type": "EMAIL",
        "isRequired": true
      }
    ]
  }
  ```

  ```json Update Parameters with Advanced Options theme={null}
  {
    "label": "Step with Advanced Parameter Options",
    "parameters": [
      {
        "id": "param-1",
        "name": "contractValue",
        "label": "Contract Value",
        "type": "CURRENCY",
        "isRequired": true,
        "advancedOptions": {
          "id": "adv-opt-1",
          "decimals": 2,
          "currency": "USD",
          "locale": "en-US",
          "max": 1000000,
          "min": 1000,
          "tooltip": "Enter the total contract value",
          "placeholder": "0.00",
          "isHidden": false
        }
      },
      {
        "id": "param-2",
        "name": "reviewNotes",
        "label": "Review Notes",
        "type": "TEXTAREA",
        "isRequired": false,
        "advancedOptions": {
          "id": "adv-opt-2",
          "maxLength": 500,
          "minLength": 0,
          "placeholder": "Enter your review comments...",
          "tooltip": "Provide detailed review notes for this contract",
          "isHidden": false
        }
      }
    ]
  }
  ```

  ```json Update Parameters with Option Items theme={null}
  {
    "label": "Step with Select Options",
    "parameters": [
      {
        "id": "param-1",
        "name": "department",
        "label": "Department",
        "type": "SELECT",
        "isRequired": true,
        "optionItems": [
          {
            "label": "Human Resources",
            "value": "hr"
          },
          {
            "label": "Finance",
            "value": "finance"
          },
          {
            "label": "IT",
            "value": "it"
          }
        ]
      }
    ]
  }
  ```

  ```json Update Parameters with Full Configuration theme={null}
  {
    "label": "Complex Parameter Configuration",
    "parameters": [
      {
        "id": "param-1",
        "name": "approvalStatus",
        "label": "Approval Status",
        "type": "RADIO",
        "isRequired": true,
        "isUnique": false,
        "columns": 12,
        "optionItems": [
          {
            "label": "Pending",
            "value": "pending"
          },
          {
            "label": "Approved",
            "value": "approved"
          },
          {
            "label": "Rejected",
            "value": "rejected"
          }
        ],
        "policyNames": ["MANAGER", "SUPERVISOR"]
      }
    ]
  }
  ```
</CodeGroup>

## Example Request

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
    --url "https://h3-api-gateway.dev.h3aven.com/v1/steps/{id}" \
    --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    --header 'Content-Type: application/json' \
    --data '{
      "label": "Updated Document Review",
      "description": "Review all submitted contract documents carefully"
    }'
  ```
</RequestExample>

## Response

The endpoint returns a `204 No Content` status code on successful update, indicating the step has been updated successfully without returning the updated data in the response body.
