Skip to main content
POST
/
v1
/
intents
/
policies
/
{policy_id}
/
rules
/
{rule_id}
Create rule delete intent
curl --request POST \
  --url https://api.privy.io/v1/intents/policies/{policy_id}/rules/{rule_id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'privy-app-id: <privy-app-id>'
{
  "intent_id": "<string>",
  "created_by_display_name": "<string>",
  "created_at": 123,
  "resource_id": "<string>",
  "authorization_details": [
    {
      "members": [
        {
          "type": "user",
          "user_id": "<string>",
          "has_signed": true,
          "display_name": "<string>"
        }
      ],
      "threshold": 123,
      "display_name": "<string>"
    }
  ],
  "status": "pending",
  "expires_at": 123,
  "intent_type": "RULE",
  "request_details": {
    "method": "POST",
    "url": "<string>",
    "body": {
      "name": "<string>",
      "method": "eth_sendTransaction",
      "conditions": [
        {
          "field_source": "ethereum_transaction",
          "field": "to",
          "operator": "eq",
          "value": "<string>"
        }
      ],
      "action": "ALLOW"
    }
  },
  "created_by_id": "<string>",
  "rejected_at": 123,
  "dismissed_at": 123,
  "dismissal_reason": "<string>",
  "current_resource_data": {
    "name": "<string>",
    "method": "eth_sendTransaction",
    "conditions": [
      {
        "field_source": "ethereum_transaction",
        "field": "to",
        "operator": "eq",
        "value": "<string>"
      }
    ],
    "action": "ALLOW",
    "id": "<string>"
  },
  "policy": {
    "version": "1.0",
    "name": "<string>",
    "chain_type": "ethereum",
    "rules": [
      {
        "name": "<string>",
        "method": "eth_sendTransaction",
        "conditions": [
          {
            "field_source": "ethereum_transaction",
            "field": "to",
            "operator": "eq",
            "value": "<string>"
          }
        ],
        "action": "ALLOW",
        "id": "<string>"
      }
    ],
    "id": "<string>",
    "created_at": 123,
    "owner_id": "<string>"
  },
  "action_result": {
    "status_code": 123,
    "executed_at": 123,
    "authorized_by_display_name": "<string>",
    "authorized_by_id": "<string>",
    "response_body": {
      "name": "<string>",
      "method": "eth_sendTransaction",
      "conditions": [
        {
          "field_source": "ethereum_transaction",
          "field": "to",
          "operator": "eq",
          "value": "<string>"
        }
      ],
      "action": "ALLOW",
      "id": "<string>"
    },
    "prior_state": {
      "name": "<string>",
      "method": "eth_sendTransaction",
      "conditions": [
        {
          "field_source": "ethereum_transaction",
          "field": "to",
          "operator": "eq",
          "value": "<string>"
        }
      ],
      "action": "ALLOW",
      "id": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

Path Parameters

policy_id
string
required

ID of the policy.

rule_id
string
required

ID of the rule.

Response

200 - application/json

Created rule delete intent.

Response for a rule intent

intent_id
string
required

Unique ID for the intent

created_by_display_name
string
required

Display name of the user who created the intent

created_at
number
required

Unix timestamp when the intent was created

resource_id
string
required

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

authorization_details
IntentAuthorization · object[]
required

Detailed authorization information including key quorum members, thresholds, and signature status

status
enum<string>
required

Current status of the intent

Available options:
pending,
executed,
failed,
expired,
rejected,
dismissed
expires_at
number
required

Unix timestamp when the intent expires

intent_type
enum<string>
required
Available options:
RULE
request_details
RuleIntentRequestDetails · object
required

The original rule request. Method is POST (create), PATCH (update), or DELETE (delete)

created_by_id
string

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

rejected_at
number

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

dismissed_at
number

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

dismissal_reason
string

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

current_resource_data
object

Current state of the rule before any changes. Undefined for create intents or if the rule was deleted

policy
object

Parent policy containing this rule, including sibling rules for contextual display

action_result
BaseActionResult · object

Result of rule execution (only present if status is 'executed' or 'failed')