# API Keys

> SDK methods for the API Keys module, accessed via `soat.apiKeys`. See the [API Keys module docs](/docs/modules/api-keys) for permissions and data model, and each method's REST page for the full request/response schema.

# API Keys

SDK methods for the API Keys module, accessed via `soat.apiKeys`. See the [API Keys module docs](/docs/modules/api-keys) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.apiKeys.listApiKeys()`

List API keys

- Method: `GET`
- Path: `/api/v1/api-keys`

```ts
await soat.apiKeys.listApiKeys({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/api-keys/list-api-keys)

### `soat.apiKeys.createApiKey()`

Create an API key

- Method: `POST`
- Path: `/api/v1/api-keys`

```ts
await soat.apiKeys.createApiKey({
  body: { name, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/api-keys/create-api-key)

### `soat.apiKeys.getApiKey()`

Get an API key

- Method: `GET`
- Path: `/api/v1/api-keys/{api_key_id}`

```ts
await soat.apiKeys.getApiKey({
  path: { api_key_id },
});
```

→ [Request & response schema](/docs/api/api-keys/get-api-key)

### `soat.apiKeys.updateApiKey()`

Update an API key

- Method: `PUT`
- Path: `/api/v1/api-keys/{api_key_id}`

```ts
await soat.apiKeys.updateApiKey({
  path: { api_key_id },
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/api-keys/update-api-key)

### `soat.apiKeys.deleteApiKey()`

Delete an API key

- Method: `DELETE`
- Path: `/api/v1/api-keys/{api_key_id}`

```ts
await soat.apiKeys.deleteApiKey({
  path: { api_key_id },
});
```

→ [Request & response schema](/docs/api/api-keys/delete-api-key)
