Skip to content

Ingestion keys CLI reference

View Markdown

The ingestion-keys command lets you manage a project’s ingestion keys. An app uses an ingestion key (hbp_) to send errors and events to Honeybadger. The web UI calls it the project’s API key.

The commands use the v3 Data API. --cli-input-json and --output json use the v3 JSON documented there.

All ingestion-keys 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 ingestion-keys 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 ingestion-keys get --project-id Xk9mZp --id Kp7mZq2x

The output includes the key’s value.

Required flags:

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

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb ingestion-keys create --project-id Xk9mZp --cli-input-json '{"label": "CI"}'
# A key without a label
hb ingestion-keys create --project-id Xk9mZp --cli-input-json '{}'

A project can hold a limited number of keys.

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:

  • label — Optional name for the key

Optional flags:

  • -o, --output — Output format: text or json (default: text)
Terminal window
hb ingestion-keys update --project-id Xk9mZp --id Kp7mZq2x --cli-input-json '{"label": "Deploys"}'

You can change a key’s label but not its value. A label sent as null is cleared.

Required flags:

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

Apps still sending with the key stop reporting. You can’t delete a project’s last key.

Required flags:

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