Intents

Create policy delete intent

Changed on

Create an intent to delete a policy. The intent must be authorized by the policy owner before it can be executed.

delete/v1/intents/policies/{policy_id}

Request

  • Base URL
    https://api.privy.io
  • URL
    https://api.privy.io/v1/intents/policies/{policy_id}
  • Auth
    HTTP basic

Path parameters

policy_idstring required

ID of the policy.

Headers

privy-app-idstring required

ID of your Privy app.

privy-request-expirystring

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

Response

Created policy delete intent.

intent_idstring required

Unique ID for the intent

created_by_display_namestring required

Display name of the user who created the intent

created_by_idstring

ID of the user who created the intent. If undefined, the intent was created using the app secret

created_atnumber required

Unix timestamp when the intent was created

resource_idstring required

ID of the resource being modified (wallet_id, policy_id, etc)

status'pending' | 'processing' | 'executed' | 'failed' | 'expired' | 'rejected' | 'dismissed' required

Current status of an intent.

custom_expiryboolean required

Whether this intent has a custom expiry time set by the client. If false, the intent expires after a default duration.

expires_atnumber required

Unix timestamp when the intent expires

rejected_atnumber

Unix timestamp when the intent was rejected, present when status is 'rejected'

dismissed_atnumber

Unix timestamp when the intent was dismissed, present when status is 'dismissed'

dismissal_reasonstring

Human-readable reason for dismissal, present when status is 'dismissed'

intent_type'POLICY' required

Example response

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

Changes

    • warning

      added the new earn_incentive_claim enum value to the /////// response property for the response status

    • warning

      added the new earn_incentive_claim enum value to the ///// response property for the response status

    • breaking

      the ///// response property's maxLength was increased from 50 to 100 for the response status

    • breaking

      the /// response property's maxLength was increased from 50 to 100 for the response status