---
title: "Create aggregation"
method: POST
path: "/v1/aggregations"
tags: ["Aggregations"]
---

# Create aggregation

`POST /v1/aggregations`

Create a new aggregation to track and measure metrics over a time window.

## Headers

- `privy-app-id` string, required — ID of your Privy app.
- `privy-idempotency-key` string — Idempotency keys ensure API requests are executed only once within a 24-hour window.

## Request body

- AggregationInput — Input for creating an aggregation.
  - `conditions` PolicyCondition[] — Optional conditions to filter events before aggregation.
    - union — A condition that must be true for the rule action to be applied.
      - object — The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.
        - `field` 'to' | 'value' | 'chain_id', required — Ethereum transaction-level fields that can be referenced in a policy condition.
        - `field_source` 'ethereum_transaction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — The decoded calldata in a smart contract interaction as the smart contract method's parameters. Note that 'ethereum_calldata' conditions must contain an abi parameter with the JSON ABI of the smart contract.
        - `abi` object[], required — A Solidity ABI definition for decoding smart contract calldata.
          - `anonymous` boolean
          - `inputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `name` string
          - `outputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
          - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
        - `field` string, required
        - `field_source` 'ethereum_calldata', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Attributes from the signing domain that will verify the signature.
        - `field` 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract', required — Supported fields for Ethereum typed data domain conditions.
        - `field_source` 'ethereum_typed_data_domain', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — 'types' and 'primary_type' attributes of the TypedData JSON object defined in EIP-712.
        - `field` string, required
        - `field_source` 'ethereum_typed_data_message', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `typed_data` TypedDataInput, required — The typed data structure containing EIP-712 types and the primary type for typed data message policy conditions.
          - `primary_type` string, required
          - `types` TypedDataTypesInputParams, required — The type definitions for EIP-712 typed data signing.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Allowed contract addresses for eth_sign7702Authorization requests.
        - `field` 'contract', required
        - `field_source` 'ethereum_7702_authorization', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — A Tempo (type 118) transaction-level field. Evaluated once per transaction (not per call).
        - `field` 'fee_token' | 'fee_payer_signature' | 'nonce_key' | 'valid_before' | 'valid_after', required — Tempo (type 118) transaction-level fields that can be referenced in a policy condition.
        - `field_source` 'tempo_transaction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Solana Program attributes, enables allowlisting Solana Programs.
        - `field` 'programId', required
        - `field_source` 'solana_program_instruction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Solana System Program attributes, including more granular Transfer instruction fields.
        - `field` 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports', required — Supported fields for Solana System Program conditions including Transfer instruction fields.
        - `field_source` 'solana_system_program_instruction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Solana Token Program attributes, including more granular TransferChecked instruction fields.
        - `field` 'instructionName' | 'Transfer.source' | 'Transfer.destination' | 'Transfer.authority' | 'Transfer.amount' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint' | 'Burn.account' | 'Burn.mint' | 'Burn.authority' | 'Burn.amount' | 'MintTo.mint' | 'MintTo.account' | 'MintTo.authority' | 'MintTo.amount' | 'CloseAccount.account' | 'CloseAccount.destination' | 'CloseAccount.authority' | 'InitializeAccount3.account' | 'InitializeAccount3.mint' | 'InitializeAccount3.owner', required — Supported fields for Solana Token Program conditions including Transfer, TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction fields.
        - `field_source` 'solana_token_program_instruction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — System attributes, including current unix timestamp (in seconds).
        - `field` 'current_unix_timestamp', required
        - `field_source` 'system', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — TRON transaction fields for TransferContract and TriggerSmartContract transaction types.
        - `field` 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value', required — Supported TRON transaction fields for TransferContract and TriggerSmartContract in format "TransactionType.field_name".
        - `field_source` 'tron_transaction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Decoded calldata from a TRON TriggerSmartContract interaction.
        - `abi` object[], required — A Solidity ABI definition for decoding smart contract calldata.
          - `anonymous` boolean
          - `inputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `name` string
          - `outputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
          - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
        - `field` string, required
        - `field_source` 'tron_trigger_smart_contract_data', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — SUI transaction command attributes, enables allowlisting specific command types. Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and 'in' operators are supported.
        - `field` 'commandName', required
        - `field_source` 'sui_transaction_command', required
        - `operator` union, required — Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are supported for command names.
          - 'eq'
          - 'in'
        - `value` union, required — Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins', 'MergeCoins'
          - 'TransferObjects' | 'SplitCoins' | 'MergeCoins' — SUI transaction commands allowlist for raw_sign endpoint policy evaluation
          - SuiCommandName[]
      - object — SUI TransferObjects command attributes, including recipient and amount fields.
        - `field` 'recipient' | 'amount', required — Supported fields for SUI TransferObjects command conditions. Only 'recipient' and 'amount' are supported.
        - `field_source` 'sui_transfer_objects_command', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Condition on the original wallet action API request body fields.
        - `field` string, required
        - `field_source` 'action_request_body', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Condition referencing an aggregation value. The field must start with "aggregation." followed by the aggregation ID.
        - `field` string, required
        - `field_source` 'reference', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Condition on the message being signed (e.g. in personal_sign).
        - `field` 'content' | 'byte_length', required — Supported fields for message signing conditions.
        - `field_source` 'message', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
  - `group_by` AggregationGroupBy[] — Optional grouping configuration for bucketing metrics.
    - `abi` object[] — A Solidity ABI definition for decoding smart contract calldata.
      - `anonymous` boolean
      - `inputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `name` string
      - `outputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
      - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
    - `field` string, required
    - `field_source` string, required
  - `method` 'eth_signTransaction' | 'eth_signUserOperation', required — The RPC method this aggregation applies to.
  - `metric` AggregationMetric, required — The metric configuration for an aggregation, defining what field/field_source to measure and the aggregation function to apply.
    - `abi` object[] — A Solidity ABI definition for decoding smart contract calldata.
      - `anonymous` boolean
      - `inputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `name` string
      - `outputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
      - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
    - `field` string, required
    - `field_source` string, required
    - `function` 'sum', required — The aggregation function to apply.
  - `name` string, required — The name of the aggregation.
  - `owner` union — The owner of the resource, specified as a Privy user ID, a P-256 public key, or null to remove the current owner.
    - object — Owner input specifying a Privy user ID.
      - `user_id` string, required
    - object — Owner input specifying a P-256 public key.
      - `public_key` string, required — A P-256 (secp256r1) public key.
  - `owner_id` string, cuid2, nullable — The key quorum ID to set as the owner of the resource. If you provide this, do not specify an owner.
  - `window` AggregationWindow, required — A rolling time window defined by a duration in seconds.
    - `seconds` integer, required — Duration of the rolling window in seconds (1-72 hours).
    - `type` 'rolling', required

## Response `200`

Created aggregation object.

- Aggregation — An aggregation that measures and tracks metrics over a period of time.
  - `conditions` PolicyCondition[] — Optional conditions to filter events before aggregation.
    - union — A condition that must be true for the rule action to be applied.
      - object — The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.
        - `field` 'to' | 'value' | 'chain_id', required — Ethereum transaction-level fields that can be referenced in a policy condition.
        - `field_source` 'ethereum_transaction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — The decoded calldata in a smart contract interaction as the smart contract method's parameters. Note that 'ethereum_calldata' conditions must contain an abi parameter with the JSON ABI of the smart contract.
        - `abi` object[], required — A Solidity ABI definition for decoding smart contract calldata.
          - `anonymous` boolean
          - `inputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `name` string
          - `outputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
          - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
        - `field` string, required
        - `field_source` 'ethereum_calldata', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Attributes from the signing domain that will verify the signature.
        - `field` 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract', required — Supported fields for Ethereum typed data domain conditions.
        - `field_source` 'ethereum_typed_data_domain', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — 'types' and 'primary_type' attributes of the TypedData JSON object defined in EIP-712.
        - `field` string, required
        - `field_source` 'ethereum_typed_data_message', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `typed_data` TypedDataInput, required — The typed data structure containing EIP-712 types and the primary type for typed data message policy conditions.
          - `primary_type` string, required
          - `types` TypedDataTypesInputParams, required — The type definitions for EIP-712 typed data signing.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Allowed contract addresses for eth_sign7702Authorization requests.
        - `field` 'contract', required
        - `field_source` 'ethereum_7702_authorization', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — A Tempo (type 118) transaction-level field. Evaluated once per transaction (not per call).
        - `field` 'fee_token' | 'fee_payer_signature' | 'nonce_key' | 'valid_before' | 'valid_after', required — Tempo (type 118) transaction-level fields that can be referenced in a policy condition.
        - `field_source` 'tempo_transaction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Solana Program attributes, enables allowlisting Solana Programs.
        - `field` 'programId', required
        - `field_source` 'solana_program_instruction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Solana System Program attributes, including more granular Transfer instruction fields.
        - `field` 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports', required — Supported fields for Solana System Program conditions including Transfer instruction fields.
        - `field_source` 'solana_system_program_instruction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Solana Token Program attributes, including more granular TransferChecked instruction fields.
        - `field` 'instructionName' | 'Transfer.source' | 'Transfer.destination' | 'Transfer.authority' | 'Transfer.amount' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint' | 'Burn.account' | 'Burn.mint' | 'Burn.authority' | 'Burn.amount' | 'MintTo.mint' | 'MintTo.account' | 'MintTo.authority' | 'MintTo.amount' | 'CloseAccount.account' | 'CloseAccount.destination' | 'CloseAccount.authority' | 'InitializeAccount3.account' | 'InitializeAccount3.mint' | 'InitializeAccount3.owner', required — Supported fields for Solana Token Program conditions including Transfer, TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction fields.
        - `field_source` 'solana_token_program_instruction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — System attributes, including current unix timestamp (in seconds).
        - `field` 'current_unix_timestamp', required
        - `field_source` 'system', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — TRON transaction fields for TransferContract and TriggerSmartContract transaction types.
        - `field` 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value', required — Supported TRON transaction fields for TransferContract and TriggerSmartContract in format "TransactionType.field_name".
        - `field_source` 'tron_transaction', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Decoded calldata from a TRON TriggerSmartContract interaction.
        - `abi` object[], required — A Solidity ABI definition for decoding smart contract calldata.
          - `anonymous` boolean
          - `inputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `name` string
          - `outputs` AbiParameter[]
            - `components` object[]
              - …
            - `indexed` boolean
            - `internalType` string
            - `name` string
            - `type` string, required
          - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
          - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
        - `field` string, required
        - `field_source` 'tron_trigger_smart_contract_data', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — SUI transaction command attributes, enables allowlisting specific command types. Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and 'in' operators are supported.
        - `field` 'commandName', required
        - `field_source` 'sui_transaction_command', required
        - `operator` union, required — Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are supported for command names.
          - 'eq'
          - 'in'
        - `value` union, required — Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins', 'MergeCoins'
          - 'TransferObjects' | 'SplitCoins' | 'MergeCoins' — SUI transaction commands allowlist for raw_sign endpoint policy evaluation
          - SuiCommandName[]
      - object — SUI TransferObjects command attributes, including recipient and amount fields.
        - `field` 'recipient' | 'amount', required — Supported fields for SUI TransferObjects command conditions. Only 'recipient' and 'amount' are supported.
        - `field_source` 'sui_transfer_objects_command', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Condition on the original wallet action API request body fields.
        - `field` string, required
        - `field_source` 'action_request_body', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Condition referencing an aggregation value. The field must start with "aggregation." followed by the aggregation ID.
        - `field` string, required
        - `field_source` 'reference', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
      - object — Condition on the message being signed (e.g. in personal_sign).
        - `field` 'content' | 'byte_length', required — Supported fields for message signing conditions.
        - `field_source` 'message', required
        - `operator` 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set' | 'contains' | 'starts_with' | 'ends_with', required — Operator to use for policy conditions.
        - `value` union, required — Value to compare against in a policy condition. Can be a single string or an array of strings.
          - string
          - string[]
  - `created_at` number, required — Unix timestamp of when the aggregation was created in milliseconds.
  - `group_by` AggregationGroupBy[] — Optional grouping configuration for bucketing metrics.
    - `abi` object[] — A Solidity ABI definition for decoding smart contract calldata.
      - `anonymous` boolean
      - `inputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `name` string
      - `outputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
      - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
    - `field` string, required
    - `field_source` string, required
  - `id` string, required — Unique ID of the aggregation.
  - `method` 'eth_signTransaction' | 'eth_signUserOperation', required — The RPC method this aggregation applies to.
  - `metric` AggregationMetric, required — The metric configuration for an aggregation, defining what field/field_source to measure and the aggregation function to apply.
    - `abi` object[] — A Solidity ABI definition for decoding smart contract calldata.
      - `anonymous` boolean
      - `inputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `name` string
      - `outputs` AbiParameter[]
        - `components` object[]
        - `indexed` boolean
        - `internalType` string
        - `name` string
        - `type` string, required
      - `stateMutability` 'pure' | 'view' | 'nonpayable' | 'payable'
      - `type` 'function' | 'constructor' | 'event' | 'fallback' | 'receive', required
    - `field` string, required
    - `field_source` string, required
    - `function` 'sum', required — The aggregation function to apply.
  - `name` string, required — The name of the aggregation.
  - `owner_id` string, nullable, required — The key quorum ID of the owner of the aggregation.
  - `window` AggregationWindow, required — A rolling time window defined by a duration in seconds.
    - `seconds` integer, required — Duration of the rolling window in seconds (1-72 hours).
    - `type` 'rolling', required

---

[API](https://skmtc.net/privy-io/apis/privy-api.md) · [All operations](https://skmtc.net/privy-io/apis/privy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/privy-io/privy-api/revisions/bb2eb34156cc/schema)
