---
title: "ezgh ingest-keys create"
description: "Create an ingest key; the secret is shown once."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh ingest-keys create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh ingest-keys create <name> [--action a]… [flags]
```

Create an ingest key for the project: the credential OpenTelemetry SDKs and Collectors send telemetry with. It can only ingest: `--action` chooses which signals (obs.logs.ingest by default, obs.traces.ingest, obs.metrics.ingest for OTLP metrics and Prometheus remote write; repeat or comma-separate for several). It can't read anything or call any other API. It belongs to the project, so it keeps working when the person who created it leaves; revoke it to stop it.

The secret is printed once, alone on stdout, and can't be shown again:

```text
EZGH_INGEST_KEY=$(ezgh ingest-keys create otel-collector --project web)
```

Part of [`ezgh ingest-keys`](/cli/reference/ingest-keys).

## Examples

```sh
ezgh ingest-keys create otel-collector --action obs.logs.ingest,obs.traces.ingest,obs.metrics.ingest
ezgh ingest-keys create prometheus --action obs.metrics.ingest
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--action` | strings, comma-separated or repeated | `[obs.logs.ingest]` | an ingest action the key allows: obs.logs.ingest, obs.traces.ingest or obs.metrics.ingest (repeat, or comma-separate; at most 20) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/ingest-keys-create/index.mdx
