> For the complete documentation index, see [llms.txt](https://docs.flashback.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flashback.tech/support-reference/platform-api-reference/storage-apis/api_keys.md).

# Repo Storage API Key

This file outlines the Flashgate 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](/support-reference/platform-api-reference.md#http-bearer-authentication).
{% endhint %}

## TypeScript Client Quick Links

```typescript
import { FlashgateClient } from '@flashgate/client';
const client = new FlashgateClient({ 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="#flashgate-api-buckets" id="flashgate-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="/pages/QHJJBBpICR6olcuhJkcj"><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="/pages/U7QcTQNv2IBR0lDkEmm1"><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="/pages/HOxXu8g5m7n7aysK2jKC"><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="/pages/ERFRlovAihNGcbaEMsvQ"><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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/storage-apis/api_keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
