Skip to content

Integrations CLI reference

View Markdown

The integrations command lets you manage a project’s notification integrations, such as Slack, webhooks, email, and PagerDuty.

The commands use the v3 Data API. --cli-input-json and --output json use the v3 JSON documented there. For example, an integration’s settings are in config.

All integrations commands need a project ID. Pass --project-id, or set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.

Terminal window
hb integrations list --project-id Xk9mZp

Required flags:

  • --project-id — Project ID. Required unless you set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.

Optional flags:

  • -o, --output — Output format: table or json (default: table)
Terminal window
hb integrations get --project-id Xk9mZp --id Ch9wLp

Required flags:

  • --project-id — Project ID. Required unless you set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.
  • --id — Integration ID

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb integrations create --project-id Xk9mZp --cli-input-json '{
"type": "WebHook",
"config": {
"url": "https://example.com/hook",
"payload_version": "v3"
},
"events": ["occurred", "resolved"]
}'
# Or from a file
hb integrations create --project-id Xk9mZp --cli-input-json file://integration.json

type picks the integration, and config holds its settings. Each type has its own config fields, listed in Integration types.

OAuth integrations, such as Slack and GitHub, are created unconnected. Connect one in the web UI at the URL the command prints.

Required flags:

  • --project-id — Project ID. Required unless you set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.
  • --cli-input-json — JSON payload (inline string or file://path)

JSON fields:

  • type — Integration type, such as WebHook, Slack, or Email (required)
  • config — The type’s settings
  • events — Events to notify on, such as occurred and resolved (defaults to the type’s default events)
  • active — Whether the integration sends notifications (default: true)

See the API reference for every field.

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb integrations update --project-id Xk9mZp --id Ch9wLp --cli-input-json '{"active": false}'

Only the fields you send change. Sending null clears a field or resets it to its default, but only on fields the API reference marks as nullable. config is merged into the stored settings, so send only the settings you’re changing. You can’t change an integration’s type. A successful update also clears error, so an active integration that stopped after a failed delivery starts delivering again.

Required flags:

  • --project-id — Project ID. Required unless you set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.
  • --id — Integration ID
  • --cli-input-json — JSON payload with fields to update
Terminal window
hb integrations delete --project-id Xk9mZp --id Ch9wLp

Required flags:

  • --project-id — Project ID. Required unless you set a default with HONEYBADGER_PROJECT_ID or project_id in the configuration file.
  • --id — Integration ID