---
title: "API Key"
description: "API keys are credentials for programmatic access to Exoscale APIs and services."
url: https://community.exoscale.com/reference/api/iam/api-key/
section: reference
last_updated: 2026-10-14
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# API Key

API keys are credentials for programmatic access to Exoscale APIs and services.

[Read more](https://community.exoscale.com/product/security/iam/how-to/key-mgmt/index.md)

## <span data-label="POST" class="pill-POST"></span>create-api-key

Create a new API key

```
POST /api-key
```

null

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | **yes** | IAM API Key Name<br/><br/>Min length: `1`. Max length: `255`. |
| `role-id` | string | **yes** | IAM API Key Role ID<br/><br/>Must be a valid UUID. |

<details>
<summary>Example</summary>

```json
{
  "name": "string",
  "role-id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `created-at` | string | IAM API Key creation timestamp<br/><br/>ISO 8601 date-time. |
| `key` | string | IAM API Key |
| `name` | string | IAM API Key name |
| `role-id` | string | IAM API Key Role ID<br/><br/>Must be a valid UUID. |
| `secret` | string | IAM API Key Secret |

<details>
<summary>Example output</summary>

```json
{
  "created-at": "2026-01-01T00:00:00Z",
  "key": "string",
  "name": "string",
  "role-id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "secret": "string"
}
```
</details>


SDK reference for `create-api-key`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateAPIKey) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_api_key) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createApiKey(com.exoscale.sdk.model.CreateApiKeyRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/index.md): `exo api create-api-key`

## <span data-label="GET" class="pill-GET"></span>get-api-key

Get API key

```
GET /api-key/{id}
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` |  |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `created-at` | string | IAM API Key creation timestamp<br/><br/>ISO 8601 date-time. |
| `key` | string | IAM API Key |
| `name` | string | IAM API Key name |
| `role-id` | string | IAM API Key Role ID<br/><br/>Must be a valid UUID. |

<details>
<summary>Example output</summary>

```json
{
  "created-at": "2026-01-01T00:00:00Z",
  "key": "string",
  "name": "string",
  "role-id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab"
}
```
</details>


SDK reference for `get-api-key`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetAPIKey) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_api_key) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getApiKey(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/index.md): `exo api get-api-key`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-api-key

Delete an API key

```
DELETE /api-key/{id}
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` |  |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](https://community.exoscale.com/reference/api/_schemas/operation/index.md#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-api-key`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteAPIKey) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_api_key) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteApiKey(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/index.md): `exo api delete-api-key`


---

## Other Operations

## <span data-label="GET" class="pill-GET"></span>list-api-keys

List API keys

```
GET /api-key
```

null

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `api-keys` | array of [IAM API Key](https://community.exoscale.com/reference/api/_schemas/iam-api-key/index.md) |  |

<details>
<summary>Example output</summary>

```json
{
  "api-keys": [
    {
      "created-at": "2026-01-01T00:00:00Z",
      "key": "string",
      "name": "string",
      "role-id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab"
    }
  ]
}
```
</details>


SDK reference for `list-api-keys`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ListAPIKeys) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.list_api_keys) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#listApiKeys())

[CLI](https://community.exoscale.com/tools/command-line-interface/index.md): `exo api list-api-keys`


