# API Keys

Before making any API calls, you’ll need to generate an API key and exchange it for an access token. Here’s how:

## 🔑 Generate Your API Key

1. Log into the Partner Dashboard.
2. Go to **Team Preferences → API Keys**.
3. Click **Generate API Key**.
4. Give it a descriptive name (e.g. “Quoting Tool - Production”).
5. Copy and store the key somewhere safe. This key authenticates your API requests and should be kept secure.

> Treat this key like a password. Do not expose it in client-side code or share it publicly.

## 🗑️ Revoke an API Key

If a key is no longer needed or may be compromised:

1. Go to **API Keys** in the dashboard.
2. Click **Revoke** next to the key you want to disable.
3. Confirm the action.

> **Important:** Revoking a key is permanent. Make sure your application is updated with a new key before revoking the old one.

## ✏️ Rename an API Key

To update the name of an existing key:

1. Go to **API Keys** in the dashboard.
2. Click **Edit Key Name** next to the key.
3. Enter a new name and save.

Renaming helps you keep keys organized by usage or environment.


---

# Agent Instructions: 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:

```
GET https://docs.alternativepayments.io/getting-started/quick-start/api-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
