---
title: "ezgh iam api-keys create"
description: "Create an API key for yourself or a bot; the key 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 iam api-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 iam api-keys create <name> [--bot b] [--expires-in-days n] [flags]
```

Create an API key that acts as you, or with `--bot` as one of the organization's bots, with exactly its owner's access. The key is printed once, on stdout, and can't be shown again:

```text
export EZGH_API_KEY=$(ezgh iam api-keys create ci --bot deployer --expires-in-days 90)
```

API keys can't create API keys: this needs a login (`ezgh login`).

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

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--bot` | string |  | create the key for this bot (ID, slug or name) instead of yourself |
| `--expires-in-days` | int |  | expire the key after 1 to 365 days (default: never) |

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

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