Skip to main content

Allow a specific user to create wallets

Allow users with a specific tag to create users

Require two users with a specific tag to add policies

The filter can match multiple tags: user.tags.contains('<TAG_A>') || user.tags.contains('<TAG_B>') would require two approvers in total from either tag, in any combination. This counts a total; see below for enforcing a separate minimum per tag.

Require multiple approvers across tags, with per-tag minimums

This policy requires at least 1 approver tagged <SECURITY_TAG_ID> and at least 2 approvers tagged <OPS_TAG_ID> to create, update, or delete policies. A user carrying both tags counts toward both minimums.

Deny all delete actions for users with a specific tag

Allow a specific user (e.g. API-only user) to create a sub-org

Allow a specific user to perform auth type activities (full list here)

Note: The activity.resource portion determines which activities can be performed. The activity.action determines what types of actions can be taken upon those resources.

Allow a specific user to perform generic OTP activities

Allow a specific user to perform a specific activity type (full list here)

Note: Activities may be upgraded over time, and thus new versions may be introduced. These policies will NOT be valid if an activity type is upgraded and requests are made on the new activity type. For example, if Turnkey introduces ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V3 (upgraded from ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2) and a request is made with the newer V3 version, this policy with not allow that user to perform ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V3 activities.
JSON

Allow a specific user to perform a specific activity kind (full list here)

Unlike activity.type, which targets one exact version, activity.kind is version-agnostic: a single kind matches every version of an activity. Prefer activity.kind when you want a policy to keep working as activities are upgraded. For example, the policy below continues to allow the user to create read write sessions even if Turnkey introduces a newer version such as ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V3, because CREATE_READ_WRITE_SESSION matches all versions. Not sure whether to use type, kind, or resource + action? See Choosing between type, kind, and resource + action for guidance.
JSON

Allow a specific user to sign transactions across all versions

JSON

Allow a specific credential type to perform a specific action (full list of credential types here)

This policy can be used to say, only passkeys are allowed to sign transactions and not authentication through SMS (or any other authentication method).
JSON

Allow a specific credential with a specific public key type to perform a specific action

JSON

Allow exporting only a specific wallet account address

JSON

Allow exporting only wallet accounts under a specific derivation subtree

You can restrict wallet account exports by the account’s BIP32 derivation path. Use wallet_account.path_indexes (the path indexes, with the hardening bit stripped) and wallet_account.path_hardened (whether each component is hardened). This policy lets a user export only accounts in the fully hardened subtree m/8797555'/*'/3'/*':
JSON
For a concrete use of this pattern, see Spark key exports: the same condition limits exports to Spark static deposit keys.
Derivation paths contain apostrophes (e.g. m/44'/60'/0'/0/0). Policy string literals cannot contain apostrophes. For this reason, the path is exposed as the path_indexes and path_hardened lists, not as a string.

Deny exporting wallet accounts by coin type

An explicit deny always wins over allow policies. You can grant a broad export allow, then deny part of the derivation tree. This policy blocks exports of accounts whose coin type (the second path component) is 60 (Ethereum):
JSON
ED25519 derivation hardens every path component. Two spellings such as m/44'/501' and m/44/501 derive the same key. For ED25519 accounts, write path conditions with path_indexes only, not path_hardened.