svanja capabilities lists every API operation, shows whether your key can run it right now, and explains why if it can’t. Run svanja capabilities show <name> for details on a single operation. Agents use these commands to see what they’re allowed to do, and you can use them to check a key before running a script.
For actions that need a person’s OK in the app, like turning on a rule or publishing a document, use svanja authorization. Both capabilities and authorization work with any key you signed in with, and the person who owns the key is the one who approves. For more background, see The REST API.
To prepare an action for approval, run svanja authorization request:
svanja authorization request --body '{"operation":"rule.enable","input":{"id":"RULE_ID"}}' --json
The response includes an approval_url and an id. Once the key’s owner opens the link and approves the request, run the action using that id:
svanja rule enable RULE_ID --field authorization_request_id=AUTHORIZATION_REQUEST_ID
You can check whether a request has been approved with svanja authorization show. Sending email works differently and uses its own two-step flow with svanja mail send prepare.