04 / QUICKSTART
Root users bypass policies. Everyone else can do nothing until a policy allows it. In this step you give a backend user exactly one permission: sign Ethereum transactions to one address.
Before you start: sign a transaction with your root API key.
1. Create a non-root user
Generate a keypair for a backend user and register its public key withcreate_users. The user starts with no permissions.
2. Create the policy
Run this with your root credentials. Replace<USER_ID> and <ALLOWED_ADDRESS> (lowercase).
condition is required: a missing, empty or whitespace-only condition is rejected with HTTP 400. Use "true" to match every activity.On mobile. In an embedded wallet the signed-in end user is normally the root user of their own sub-organization, so policies do not restrict them. Policies in a sub-organization matter for other users you add there, for example a backend key used for delegated access.
3. Test it
Sign two transactions with the new user’s API key, as in the previous step: one to<ALLOWED_ADDRESS> and one to any other address.
- To the allowlisted address: the activity is
ACTIVITY_STATUS_COMPLETED. - To any other address: the activity is
ACTIVITY_STATUS_FAILED, because no policy allows it.
4. Clean up
Delete the policy with your root credentials, for exampleapi.deletePolicies({ policyIds: [policyId] }). A policy ID that does not exist returns HTTP 404. See Managing policies.
Where to go next
Policy language
Conditions, consensus and transaction fields
Policy examples
Ready-made patterns for access and signing control
Embedded Wallets
Wallets for your end users, one sub-organization each
Company Wallets
Automated signing for your own operations