oz0 notify rule put

Add a notification rule, or replace one with --id.

For: Operators and developers looking up a command.

Add a notification rule, or replace one with --id.

A rule names events (--event, repeatable): approval.waiting, approval.escalated, approval.expired, question.waiting, budget_request.waiting, job.failed, budget.share, eval.regression, model.changed, tool_rule.expiring, secret.expiring, quality.drift and model.retiring. It may narrow them to agents, tools (<tool> or <tool>.<function>, * for anything) and risk classes (read_only, destructive, open_world, undeclared), and it sends them to targets:

--email-role admin email to the tenant's members of a role (and the roles above it) --email-team payments email to a team's members --email-person ana email to an account, by name (never by address) --webhook URL --secret S a signed POST to URL; S is the tenant secret its HMAC key is in --channel CHANNEL:ROOM a chat channel's room, such as teams:19:[email protected] (a room a verified message came from, for Teams); its readers get the facts only, and an approval's buttons --channel-person teams:ana an account's private chat with the bot, through their linked chat identity; also --channel-team and --channel-role. The call's details only for people who may read them

People get mail at the address their identity provider gives, or the one they set with oz0 notify address; email needs the SMTP relay the operator configures (orchestrator-zero server --smtp-addr).

A notification carries the event's facts (tenant, agent, tool, the job's link, the deadline and the step), never the call's arguments unless the tenant's admins set notify-content to arguments, and never a link or code that decides: people decide in OZ, and a webhook's receiver decides through the runtime API with an API key, then polls ListApprovals for the outcome.

That key decides only the approvals its webhook was sent (or whose deciders name it): name it with --decide-key, the key's ID as oz0 apikey list shows it. Any other key is refused. A put that names a key, sends a named key other approvals or moves its webhook is a governance change: it takes --reason (default $OZ0_REASON), and where the tenant has four eyes on it waits for another admin; taking a key out applies at once.

Usage

oz0 notify rule put NAME [flags]

Flags

FlagTypeDefaultDescription
--agentstringsonly this agent's events; repeatable, * matches anything
--channelstringspost to a chat channel's room, CHANNEL:ROOM; repeatable
--channel-personstringspost to an account's private chat with a channel's bot, CHANNEL:ACCOUNT; repeatable
--channel-rolestringspost to the private chats of a role's members with a channel's bot, CHANNEL:ROLE; repeatable
--channel-teamstringspost to a team's members' private chats with a channel's bot, CHANNEL:TEAM; repeatable
--decide-keystringthe ID of the API key the webhooks' receiver decides the approvals it is sent with
--decision-refstringthe decision or case the change follows, such as a case number (at most 200 characters)
--disabledboolkeep the rule but send nothing
--email-personstringsemail this account, by name; repeatable
--email-rolestringsemail the tenant's members of this role: reader, operator, admin or owner; repeatable
--email-teamstringsemail this team's members; repeatable
--eventstringsan event the rule sends; repeatable
--idstringreplace this rule
--jsonboolprint JSON instead of a table
--reasonstringwhy, required for every governance change (at most 500 characters; default $OZ0_REASON); the audit log keeps it
--riskstringsonly calls of this risk class: read_only, destructive, open_world, undeclared; repeatable
--secretstringthe tenant secret webhooks are signed with (HMAC-SHA256): a signing key bound to the webhook's host (oz0 secret set NAME --host HOST --signing)
--tenantstringdefaulttenant
--toolstringsonly this tool's or function's events; repeatable
--webhookstringspost signed JSON to this https URL; repeatable

Inherited flags

FlagTypeDefaultDescription
--contextstring$OZ0_CONTEXT or <config dir>/orchestrator-zero/context.jsonCLI context file written by server init
--log-levelstringinfolog level: debug, info, warn or error

See all oz0 commands and the global flags.

On this page
Copyright © 2026