Skip to main content
Version: v5.7.0

opschain triggers enable

triggers

opschain triggers enable <project>/<code>

Enables a trigger: a one-attribute update (enabled: true) over the ordinary authorised update endpoint (PATCH /api/projects/{project}/triggers/{id}). Only an enabled trigger matches events; a disabled one records nothing.

On success: enabled trigger <project>/<code> (-o json|yaml prints the server's response document instead). Needs a server target (--server <url>, OPSCHAIN_SERVER, or the active context).

Exit codes​

CodeMeaning
0Trigger enabled.
1The command failed (trigger not found, server refused the update).
2Usage error — malformed address, no server target.

Named errors​

  • expected <project>/<trigger-code>, got "<arg>" — exit 2.
  • trigger "<code>" not found in project "<project>" — exit 1.

See also​

  • opschain docs cli/triggers-disable.
  • opschain docs cli/triggers-test — check the enabled gate (and the rest) against a real event.