Skip to main content
Every command that takes a JSON body also accepts two escape hatches. Use them when the API supports a field that doesn’t have a dedicated flag yet, or when you want to reuse a stored template.

--body-json

Provides the full request body. The source can be:
  • a literal JSON string
  • @path/to/file.json to read from a file
  • - to read from stdin

--field key=value

Set or override individual top-level fields. Repeatable. The value is parsed as JSON first (count=5, active=true, tags='["a","b"]'), falling back to a plain string.

Layering

Typed flags (--from, --subject, --domain, etc.) win over --body-json for the same field, so you can layer overrides on top of a stored template.
Resolution order, last write wins:
  1. --body-json source (template)
  2. --field key=value overrides
  3. Typed flags (--from, --to, --subject, etc.)

When to use

  • --body-json: storing reusable templates, replaying captured payloads, exotic shapes (nested objects, repeated keys).
  • --field: one-off tweaks to a body the CLI already builds, or API fields that don’t yet have a dedicated flag.
  • Typed flags: everything else. They’re validated, autocompletable, and clearer in scripts.