> 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="/support-reference/platform-api-reference/storage-apis/api_keys/delete__repo_-repoid-_apikey_-apikeyid.md"><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="/support-reference/platform-api-reference/storage-apis/api_keys/get__repo_-repoid-_apikey.md"><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="/support-reference/platform-api-reference/storage-apis/api_keys/post__repo_-repoid-_apikey.md"><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="/support-reference/platform-api-reference/storage-apis/api_keys/put__repo_-repoid-_apikey_-apikeyid.md"><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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
