# Repo Storage API Key

This file outlines the Flashback API's repository API key management functionality, including creating, listing, updating, and deleting scoped API keys for individual repositories. Each key can be assigned specific access levels—**READ**, **WRITE**, or **ADMIN**—to control repository usage securely.

{% hint style="info" %}
To perform this operation, you must be authenticated by means of one of the following methods: [BearerAuth](https://docs.flashback.tech/support-reference/platform-api-reference/..#http-bearer-authentication).
{% endhint %}

## TypeScript Client Quick Links

```typescript
import { FlashbackClient } from '@flashback/client';
const client = new FlashbackClient({ accessToken: 'your-access-token' });

// List API keys for a repo
await client.apiKeys.list('repo-id');

// Create API key
await client.apiKeys.create('repo-id', { name: 'CI Bot', access: 'READ' });

// Update API key
await client.apiKeys.update('repo-id', 'apikey-id', { name: 'CI Bot v2', access: 'WRITE' });

// Delete API key
await client.apiKeys.delete('repo-id', 'apikey-id');
```

## API Keys API Calls <a href="#flashback-api-buckets" id="flashback-api-buckets"></a>

<table><thead><tr><th>Method</th><th valign="middle">API Reference</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;"><code>DELETE</code></mark><code>/repo/{repoId}/apikey/{apikeyId}</code></td><td valign="middle"><a href="api_keys/delete__repo_-repoid-_apikey_-apikeyid"><strong>delete__repo_{repoId}_apikey_{apikeyId}</strong></a></td><td>Revoke and delete a specific API key.</td></tr><tr><td><mark style="color:green;"><code>GET</code></mark><code>/repo/{repoId}/apikey</code></td><td valign="middle"><a href="api_keys/get__repo_-repoid-_apikey"><strong>get__repo_{repoId}_apikey</strong></a></td><td>Retrieve all API keys associated with the specified repository.</td></tr><tr><td><mark style="color:orange;"><code>POST</code></mark><code>/repo/{repoId}/apikey</code></td><td valign="middle"><a href="api_keys/post__repo_-repoid-_apikey"><strong>post__repo_{repoId}_apikey</strong></a></td><td>Create a new API key for the specified repository.</td></tr><tr><td><mark style="color:purple;"><code>PUT</code></mark><code> /repo/{repoId}/apikey/{apikeyId}</code></td><td valign="middle"><a href="api_keys/put__repo_-repoid-_apikey_-apikeyid"><strong>put__repo_{repoId}_apikey_{apikeyId}</strong></a></td><td>Update the name or access level of an existing API key.</td></tr></tbody></table>
