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

# Update condition set items

Propose an intent to add items to a [condition set](https://docs.privy.io/controls/policies/condition-sets.md) or to replace all of its items.

The condition set's [owner](https://docs.privy.io/controls/authorization-keys/using-owners/overview.md) must authorize the intent. Privy rejects intents for a condition set with no owner. Update those condition sets directly instead.

Each endpoint accepts the same request body as its synchronous counterpart ([add items](https://docs.privy.io/api-reference/condition-sets/condition-set-items/create.md), [replace items](https://docs.privy.io/api-reference/condition-sets/condition-set-items/update.md)) but does **not** require authorization signatures in the request.

> [!NOTE]
>
> Intents expire 72 hours after creation by default. Signers must
> [authorize](https://docs.privy.io/transaction-management/intents/sign-intents.md) them within this window.

## Add items

Make a `POST` request to `/v1/intents/condition_sets/{condition_set_id}/condition_set_items` with the values to add.

Values are unique within a condition set. Privy rejects the intent if any value already exists in the set.

> [tab] REST API
>
> ```bash theme={"system"}
> curl -X POST https://api.privy.io/v1/intents/condition_sets/<condition_set_id>/condition_set_items \
>   -u "<your-privy-app-id>:<your-privy-app-secret>" \
>   -H "privy-app-id: <your-privy-app-id>" \
>   -H "Content-Type: application/json" \
>   -d '[
>     {"value": "0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93"},
>     {"value": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2"}
>   ]'
> ```

> [tab] Node SDK
>
> ```typescript {skip-check} theme={"system"}
> import {PrivyClient} from '@privy-io/node';
>
> const client = new PrivyClient({
>   appId: 'your-app-id',
>   appSecret: 'your-app-secret'
> });
>
> const intent = await client.intents().createConditionSetItems('insert-condition-set-id', {
>   condition_set_items_request_body: [
>     {value: '0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93'},
>     {value: '0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2'}
>   ]
> });
>
> console.log(intent.intent_id, intent.status, intent.authorization_details);
> ```

View the [API reference](https://docs.privy.io/api-reference/intents/add-condition-set-items.md) for adding items through an intent.

## Replace items

Make a `PUT` request to `/v1/intents/condition_sets/{condition_set_id}/condition_set_items` with the full list of values. When the intent executes, Privy deletes every existing item and adds the values in the request.

Any other change to the condition set's items [dismisses](https://docs.privy.io/transaction-management/intents/lifecycle.md) a pending replace intent. Propose a new intent with the updated list.

> [tab] REST API
>
> ```bash theme={"system"}
> curl -X PUT https://api.privy.io/v1/intents/condition_sets/<condition_set_id>/condition_set_items \
>   -u "<your-privy-app-id>:<your-privy-app-secret>" \
>   -H "privy-app-id: <your-privy-app-id>" \
>   -H "Content-Type: application/json" \
>   -d '[
>     {"value": "0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93"},
>     {"value": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2"}
>   ]'
> ```

> [tab] Node SDK
>
> ```typescript {skip-check} theme={"system"}
> import {PrivyClient} from '@privy-io/node';
>
> const client = new PrivyClient({
>   appId: 'your-app-id',
>   appSecret: 'your-app-secret'
> });
>
> const intent = await client.intents().updateConditionSetItems('insert-condition-set-id', {
>   condition_set_items_request_body: [
>     {value: '0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93'},
>     {value: '0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2'}
>   ]
> });
>
> console.log(intent.intent_id, intent.status, intent.authorization_details);
> ```

View the [API reference](https://docs.privy.io/api-reference/intents/replace-condition-set-items.md) for replacing items through an intent.

## Next steps

> [card] [Sign intents](https://docs.privy.io/transaction-management/intents/sign-intents.md)
>
> Add authorization signatures to execute a proposed intent.

> [card] [Intent status](https://docs.privy.io/transaction-management/intents/lifecycle.md)
>
> Track an intent from proposal to execution.
