---
title: "SDK: apikeys"
description: "The apikeys methods of the Overlane TypeScript SDK, with their signatures. Generated from the SDK types."
---

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

# SDK: apikeys

{/* Generated by apps/docs/scripts/generate.mjs (SDK pages from the TypeScript types in packages/sdk). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

The `apikeys` area has 4 methods on the client. Each takes one object of path, query and body arguments and an optional `CallOptions`, and returns a promise of the response body. A refused call rejects with `OverlaneApiError` (see the [SDK index](/sdk/)).

## apikeysCreate

Create an API key; the secret is shown once (secrets class)

- Request: `POST` on `/v1/tenants/{tenantId}/api-keys`
- Needs an approval for agents: class `secrets`

```ts
apikeysCreate(args: { tenantId: string; body: CreateApiKeyRequest }, options?: CallOptions): Promise<ApiKeyCreated>
```

## apikeysList

List the team's API keys; a key shows its prefix, never the secret

- Request: `GET` on `/v1/tenants/{tenantId}/api-keys`

```ts
apikeysList(args: { tenantId: string }, options?: CallOptions): Promise<ApiKeyList>
```

## apikeysRevoke

Revoke an API key; the next call with it fails (secrets class)

- Request: `DELETE` on `/v1/tenants/{tenantId}/api-keys/{apiKeyId}`
- Needs an approval for agents: class `secrets`

```ts
apikeysRevoke(args: { tenantId: string; apiKeyId: string }, options?: CallOptions): Promise<ApiKey>
```

## apikeysRotate

Rotate an API key: a new key with the same settings, the old one revoked (secrets class)

- Request: `POST` on `/v1/tenants/{tenantId}/api-keys/{apiKeyId}/rotate`
- Needs an approval for agents: class `secrets`

```ts
apikeysRotate(args: { tenantId: string; apiKeyId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<ApiKeyCreated>
```

Source: https://docs.overlane.app/sdk/apikeys/index.mdx
