Skip to content

privy policies create

Create a policy with optional initial rules and owner; empty rules default to deny. Does not attach wallets.

Terminal window
privy policies create [options]
Option Description
--dry-run Validate and print the API request without network access or credentials.
--yes Confirm this mutation or export.
--confirm-owner <id> Explicitly confirm assigning this owner; later control changes require owner authorization.
--body <json> JSON body, or - to read stdin.
--file <path> JSON body file, or - to read stdin.
--name <string> Policy or rule display name (1–50 characters).
--chain-type <string> Policy chain type. ethereum also covers Tempo/EVM networks.
--owner-id <string> Optional owning key quorum in this app; requires --confirm-owner. All subsequent changes require owner authorization.
--version <string> Policy language version (default 1.0).
--rules <json> Initial rules: each has name, method, action (ALLOW/DENY) and conditions. Same schema as policies rules create. Empty defaults to deny.
--allow-production Explicitly allow this production mutation; also requires --yes.

Global options such as --app, --account and --profile also apply. See the command reference overview.

Terminal window
privy policies create --name payout-guard --chain-type ethereum --dry-run
privy policies create --file policy.json --confirm-owner <quorum-id> --yes
  • Changes data: yes. Preview with --dry-run, then run with --yes and any required confirmations.
  • Scope: app
  • Before it runs: Read app environment; existing policies must have owner_id: null. Policy deletion also requires exact name and deletable: true.
  • Production apps: Requires --allow-production in addition to --yes.
  • Verification: Fresh policy read and field comparison; deletion requires verified absence.
  • Retries: None.

Inspect the full contract locally with privy schema policies create.

Privy CLI is an unofficial, community project by Samarth Saxena. Not affiliated with or endorsed by Privy. The Privy name and wordmark belong to Privy. It uses undocumented dashboard APIs that can change.