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

# Update a Validator

> Update a validator name and its dynamic threshold sensitivity in a single mutation with the Validio SDK.

## Overview

Update the name of a validator and the sensitivity of its dynamic threshold in a single mutation. The threshold is part of the validator input, under a variant-specific key (`dynamic` for `DynamicThreshold`).

> [!NOTE]
>
> When you create, update, or delete an object, you use a `mutation` operation instead of a `query`.

## Steps

**1. Create the mutation**

Create a single `validatorUpdate` mutation that covers both the name and the threshold update.

**2. Create the variables**

Build the input with the validator ID, the new name, and the threshold under its variant-specific key (`dynamic`). For a validator with a fixed threshold, use `fixed` instead.

**3. Send the request**

Send the mutation with the input. The server applies both changes atomically.

## Full code sample

```python title="Python" theme={null}
import os

from validio_sdk.client import Client


async def example(validator_id: str = os.environ["EXAMPLE_VALIDATOR_ID"]):
    client = Client()
    query = """
    mutation ValidatorUpdate($input: ValidatorUpdateInput!) {
      validatorUpdate(input: $input) {
        id
      }
    }
    """
    variables = {
        "input": {
            "id": validator_id,
            "name": "New Validator Name",
            "threshold": {
                "dynamic": {
                    "sensitivity": 123.45,
                    "decisionBoundsType": "UPPER_AND_LOWER",
                },
            },
        },
    }

    await client.execute(
        query,
        variable_values=variables,
    )

    print("Updated name and threshold")
```

## Example response

```json title="JSON" theme={null}
{
  "validatorUpdate": {
    "id": "MTR_..."
  }
}
```
