Policies

Update Policy Rule

Update a rule by policy ID and rule ID.

patch/v1/policies/{policy_id}/rules/{rule_id}

Path parameters

policy_idstring required
rule_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

action'ALLOW' | 'DENY' required

The action to take when a policy rule matches.

method'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'personal_sign' | 'eth_sign7702Authorization' | 'wallet_sendCalls' | 'signTransaction' | 'signAndSendTransaction' | 'signMessage' | 'exportPrivateKey' | 'exportSeedPhrase' | 'signTransactionBytes' | 'signRawMessageBytes' | 'tron_sendTransaction' | 'tron_signTransaction' | 'earn_deposit' | 'earn_withdraw' | 'transfer' | '*' required

Method the rule applies to.

namestring required

Example request

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

Response

Updated policy rule object.

action'ALLOW' | 'DENY' required

The action to take when a policy rule matches.

idstring required
method'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'personal_sign' | 'eth_sign7702Authorization' | 'wallet_sendCalls' | 'signTransaction' | 'signAndSendTransaction' | 'signMessage' | 'exportPrivateKey' | 'exportSeedPhrase' | 'signTransactionBytes' | 'signRawMessageBytes' | 'tron_sendTransaction' | 'tron_signTransaction' | 'earn_deposit' | 'earn_withdraw' | 'transfer' | '*' required

Method the rule applies to.

namestring required

Example response

{
  "action": "ALLOW",
  "conditions": [
    {
      "field": "to",
      "field_source": "ethereum_transaction",
      "operator": "eq",
      "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
    }
  ],
  "id": "rule_123",
  "method": "eth_sendTransaction",
  "name": "Allowlist USDC contract on Base"
}

Changes

Changed in 6 of the 46 revisions of this API.35158

  • c10a42ebeddb22See the full diff
    • added the new tron_sendTransaction enum value to the response property for the response status

      response-property-enum-value-added

    • added the new tron_signTransaction enum value to the response property for the response status

      response-property-enum-value-added

    • added the new tron_sendTransaction enum value to the request property

      request-property-enum-value-added

    • added the new tron_signTransaction enum value to the request property

      request-property-enum-value-added

  • 9955c27139f3112See the full diff
    • removed the enum value raw_sign of the request property

      request-property-enum-value-removed

    • added the new signRawMessageBytes enum value to the response property for the response status

      response-property-enum-value-added

    • added the new signRawMessageBytes enum value to the request property

      request-property-enum-value-added

    • removed the raw_sign enum value from the response property for the response status

      response-property-enum-value-removed

  • 8f9eb26a224811See the full diff
    • added the new signMessage enum value to the response property for the response status

      response-property-enum-value-added

    • added the new signMessage enum value to the request property

      request-property-enum-value-added

  • 916b8f0728f414649See the full diff
    • added to the / response property oneOf list for the response status

      response-property-one-of-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new contains enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new ends_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new raw_sign enum value to the response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added the new starts_with enum value to the /// response property for the response status

      response-property-enum-value-added

    • added message discriminator mapping keys to the / request property

      request-property-discriminator-mapping-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new contains enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new ends_with enum value to the request property ///

      request-property-enum-value-added

    • added the new raw_sign enum value to the request property

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added the new starts_with enum value to the request property ///

      request-property-enum-value-added

    • added to the / request property oneOf list

      request-property-one-of-added

    • added message discriminator mapping keys to the / response property for the response status

      response-property-discriminator-mapping-added

  • ea8d2aa3a76f11See the full diff
    • added the new personal_sign enum value to the response property for the response status

      response-property-enum-value-added

    • added the new personal_sign enum value to the request property

      request-property-enum-value-added

  • 9be6c2925d4713See the full diff
    • added to the / response property oneOf list for the response status

      response-property-one-of-added

    • added tempo_transaction discriminator mapping keys to the / request property

      request-property-discriminator-mapping-added

    • added to the / request property oneOf list

      request-property-one-of-added

    • added tempo_transaction discriminator mapping keys to the / response property for the response status

      response-property-discriminator-mapping-added