CH·02CLI reference

deeprelay alerts set

Change the low-balance threshold or turn alert emails on or off

Change the low-balance threshold or turn alert emails on or off

Synopsis

Changes your organization's alert settings. Only the flags you pass change; everything else keeps its current value. The command reads the current settings, applies your flags and saves the result.

  • --balance-threshold sets the low-balance threshold, from 0.01 to 1000000 with at most two decimals (5, 12.50)
  • --email-balance-low=true|false turns low-balance emails on or off
  • --email-plan-allowance=true|false turns plan-allowance emails on or off
  • --email-key-budgets=true|false turns key-budget emails on or off
  • --email-member-spend=true|false turns the member-spend emails to org admins on or off. The member still receives their own limit emails.

Write an email switch as --flag=false; --flag false is refused. A bare --email-balance-low means true. Running set with no flag is refused with nothing to set, and so is a threshold outside the range. Neither reaches the server.

Changing settings requires an org admin, or a full_access key. Anything else fails with changing alert settings requires org admin or a full_access key and exits 1. Every change is recorded in the organization's audit log with its before and after values. On success the saved settings are printed in the same layout as deeprelay alerts get, and the command exits 0.

Examples

# Email me when the balance falls below $25
deeprelay alerts set --balance-threshold 25

# Stop the plan-allowance emails, keep everything else
deeprelay alerts set --email-plan-allowance=false

# Raise the threshold and turn key-budget emails back on
deeprelay alerts set --balance-threshold 50 --email-key-budgets=true
deeprelay alerts set [flags]

Options

      --balance-threshold string   Email when the balance falls below this many USD (e.g. 5 or 12.50; min 0.01)
      --email-balance-low          Low balance emails to org admins (--email-balance-low=false to turn off) (default true)
      --email-key-budgets          Key budget emails at 80% and 100% (--email-key-budgets=false to turn off) (default true)
      --email-member-spend         Member spend emails to org admins at 80%, 95% and 100% (--email-member-spend=false to turn off) (default true)
      --email-plan-allowance       Plan allowance emails at 80% and 100% (--email-plan-allowance=false to turn off) (default true)
  -h, --help                       help for set

Options inherited from parent commands

      --api-base string   API base URL (override with DEEPRELAY_API_BASE env) (default "https://api.deeprelay.ai/v1")
      --debug             Enable debug logging to stderr
      --no-preflight      Skip the plan/credit check before inference requests (override with DEEPRELAY_NO_PREFLIGHT env)
  -o, --output string     Output format: table|json (default table on TTY, json otherwise) (default "table")

SEE ALSO

← The deeprelay CLI