---
title: Ingestion keys CLI reference
description: Manage a Honeybadger project's ingestion keys from the command line.
url: https://docs.honeybadger.io/tools/cli/ingestion-keys/
---

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](https://docs.honeybadger.io/guides/projects/#api-keys).

The commands use the [v3 Data API](https://docs.honeybadger.io/api/v3/ingestion-keys/list-ingestion-keys/). `--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.

## List ingestion keys

```shell
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`)

## Get ingestion key details

```shell
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`)

## Create an ingestion key

```shell
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`)

## Update an ingestion key

```shell
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

## Delete an ingestion key

```shell
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

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
