Policies

Update Policy

Update a policy by policy ID.

patch/v1/policies/{policy_id}

Path parameters

policy_idstring required

Headers

privy-app-idstring required

ID of your Privy app.

privy-authorization-signaturestring

Request authorization signature. If multiple signatures are required, they should be comma separated.

privy-request-expirystring

Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.

Request body

namestring

Name to assign to policy.

owner_idstring cuid2 nullable

The key quorum ID to set as the owner of the resource. If you provide this, do not specify an owner.

Example request

{
  "rules": [
    {
      "conditions": [
        {
          "field": "content"
        }
      ]
    }
  ]
}

Response

Updated policy object.

chain_type'ethereum' | 'solana' | 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'bitcoin-taproot' | 'pearl' | 'near' | 'ton' | 'starknet' | 'spark' required

The wallet chain types.

created_atnumber required

Unix timestamp of when the policy was created in milliseconds.

idstring required

Unique ID of the created policy. This will be the primary identifier when using the policy in the future.

namestring required

Name to assign to policy.

owner_idstring cuid2 required

A unique identifier for a key quorum.

version'1.0' required

Version of the policy. Currently, 1.0 is the only version.

Example response

{
  "chain_type": "ethereum",
  "created_at": 1741833088894,
  "id": "tb54eps4z44ed0jepousxi4n",
  "name": "Allowlisted stablecoins",
  "owner_id": null,
  "rules": [
    {
      "action": "ALLOW",
      "conditions": [
        {
          "field": "to",
          "field_source": "ethereum_transaction",
          "operator": "eq",
          "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
        }
      ],
      "id": "bdyfoa65pro1eez6iwtzanol",
      "method": "eth_sendTransaction",
      "name": "Allowlist USDC contract on Base"
    }
  ],
  "version": "1.0"
}

Changes

Changed in 7 of the 46 revisions of this API.35160

  • c10a42ebeddb22See the full diff
    • added the new tron_sendTransaction enum value to the rules/items/method response property for the response status 200

      response-property-enum-value-added

    • added the new tron_signTransaction enum value to the rules/items/method response property for the response status 200

      response-property-enum-value-added

    • added the new tron_sendTransaction enum value to the request property rules/items/method

      request-property-enum-value-added

    • added the new tron_signTransaction enum value to the request property rules/items/method

      request-property-enum-value-added

  • 9955c27139f3112See the full diff
    • removed the enum value raw_sign of the request property rules/items/method

      request-property-enum-value-removed

    • added the new signRawMessageBytes enum value to the rules/items/method response property for the response status 200

      response-property-enum-value-added

    • added the new signRawMessageBytes enum value to the request property rules/items/method

      request-property-enum-value-added

    • removed the raw_sign enum value from the rules/items/method response property for the response status 200

      response-property-enum-value-removed

  • 8f9eb26a224811See the full diff
    • added the new signMessage enum value to the rules/items/method response property for the response status 200

      response-property-enum-value-added

    • added the new signMessage enum value to the request property rules/items/method

      request-property-enum-value-added

  • 916b8f0728f414649See the full diff
    • added MessageSigningCondition to the rules/items/conditions/items/ response property oneOf list for the response status 200

      response-property-one-of-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #10: SystemCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #11: TronTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #12: TronCalldataCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #14: SuiTransferObjectsCommandCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #15: ActionRequestBodyCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #16: AggregationCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #1: EthereumTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #2: EthereumCalldataCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #3: EthereumTypedDataDomainCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #4: EthereumTypedDataMessageCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #5: Ethereum7702AuthorizationCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #6: TempoTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #7: SolanaProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #8: SolanaSystemProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new contains enum value to the rules/items/conditions/items/oneOf[subschema #9: SolanaTokenProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #10: SystemCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #11: TronTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #12: TronCalldataCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #14: SuiTransferObjectsCommandCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #15: ActionRequestBodyCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #16: AggregationCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #1: EthereumTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #2: EthereumCalldataCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #3: EthereumTypedDataDomainCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #4: EthereumTypedDataMessageCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #5: Ethereum7702AuthorizationCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #6: TempoTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #7: SolanaProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #8: SolanaSystemProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new ends_with enum value to the rules/items/conditions/items/oneOf[subschema #9: SolanaTokenProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new raw_sign enum value to the rules/items/method response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #10: SystemCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #11: TronTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #12: TronCalldataCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #14: SuiTransferObjectsCommandCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #15: ActionRequestBodyCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #16: AggregationCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #1: EthereumTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #2: EthereumCalldataCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #3: EthereumTypedDataDomainCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #4: EthereumTypedDataMessageCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #5: Ethereum7702AuthorizationCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #6: TempoTransactionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #7: SolanaProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #8: SolanaSystemProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added the new starts_with enum value to the rules/items/conditions/items/oneOf[subschema #9: SolanaTokenProgramInstructionCondition]/operator response property for the response status 200

      response-property-enum-value-added

    • added message discriminator mapping keys to the rules/items/conditions/items/ request property

      request-property-discriminator-mapping-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #10: SystemCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #11: TronTransactionCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #12: TronCalldataCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #14: SuiTransferObjectsCommandCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #15: ActionRequestBodyCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #16: AggregationCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #1: EthereumTransactionCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #2: EthereumCalldataCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #3: EthereumTypedDataDomainCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #4: EthereumTypedDataMessageCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #5: Ethereum7702AuthorizationCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #6: TempoTransactionCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #7: SolanaProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #8: SolanaSystemProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new contains enum value to the request property rules/items/conditions/items/oneOf[subschema #9: SolanaTokenProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #10: SystemCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #11: TronTransactionCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #12: TronCalldataCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #14: SuiTransferObjectsCommandCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #15: ActionRequestBodyCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #16: AggregationCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #1: EthereumTransactionCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #2: EthereumCalldataCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #3: EthereumTypedDataDomainCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #4: EthereumTypedDataMessageCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #5: Ethereum7702AuthorizationCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #6: TempoTransactionCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #7: SolanaProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #8: SolanaSystemProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new ends_with enum value to the request property rules/items/conditions/items/oneOf[subschema #9: SolanaTokenProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new raw_sign enum value to the request property rules/items/method

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #10: SystemCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #11: TronTransactionCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #12: TronCalldataCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #14: SuiTransferObjectsCommandCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #15: ActionRequestBodyCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #16: AggregationCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #1: EthereumTransactionCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #2: EthereumCalldataCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #3: EthereumTypedDataDomainCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #4: EthereumTypedDataMessageCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #5: Ethereum7702AuthorizationCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #6: TempoTransactionCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #7: SolanaProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #8: SolanaSystemProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added the new starts_with enum value to the request property rules/items/conditions/items/oneOf[subschema #9: SolanaTokenProgramInstructionCondition]/operator

      request-property-enum-value-added

    • added MessageSigningCondition to the rules/items/conditions/items/ request property oneOf list

      request-property-one-of-added

    • added message discriminator mapping keys to the rules/items/conditions/items/ response property for the response status 200

      response-property-discriminator-mapping-added

    • removed KeyQuorumId subschema #2 from the owner_id response property allOf list for the response status 200

      response-property-all-of-removed

    • added KeyQuorumId subschema #2 to the owner_id response property anyOf list for the response status 200

      response-property-any-of-added

  • ea8d2aa3a76f11See the full diff
    • added the new personal_sign enum value to the rules/items/method response property for the response status 200

      response-property-enum-value-added

    • added the new personal_sign enum value to the request property rules/items/method

      request-property-enum-value-added

  • 9be6c2925d4713See the full diff
    • added TempoTransactionCondition to the rules/items/conditions/items/ response property oneOf list for the response status 200

      response-property-one-of-added

    • added tempo_transaction discriminator mapping keys to the rules/items/conditions/items/ request property

      request-property-discriminator-mapping-added

    • added TempoTransactionCondition to the rules/items/conditions/items/ request property oneOf list

      request-property-one-of-added

    • added tempo_transaction discriminator mapping keys to the rules/items/conditions/items/ response property for the response status 200

      response-property-discriminator-mapping-added