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

# 🔑 API Key Guide

> How to create an API KEY

***

Welcome to our API Key Generation Guide! This page will walk you through the process of obtaining an API key to interact with Capa's payments infrastructure powered by stablecoins, enabling your users to do payins and payouts.

## 📝 How to Obtain Your API Key

Capa provides two environments, each with its own onboarding process:

### 🧪 Sandbox

For testing and development, use the **Sandbox** at [sandbox.capa.fi](https://sandbox.capa.fi). No KYB (Know Your Business) verification is required. The sandbox lets you test transaction creation, create users, generate API keys, view metrics, check quoting and spread, list transactions and users, and configure webhooks.

1. Go to [sandbox.capa.fi](https://sandbox.capa.fi)
2. Sign up with your email
3. Navigate to **Settings > Dev Tools** and click **Generate API Key** to obtain your sandbox API key
4. Use this key with the sandbox API at `https://api.sandbox.capa.fi`

### 🚀 Production

For live transactions, use the **Dashboard** at [dashboard.capa.fi](https://dashboard.capa.fi). This requires KYB verification and self-onboarding. The dashboard provides the same capabilities as the sandbox -- transaction creation, user management, API key generation, metrics, quoting, spread, transaction and user listing, and webhook configuration -- connected to the production environment.

1. Go to [dashboard.capa.fi](https://dashboard.capa.fi)
2. Sign up with your email
3. Complete the **KYB (Know Your Business)** verification process
4. Follow the **self-onboarding** steps to set up your partner account
5. Navigate to **Settings > Dev Tools** and click **Generate API Key** to obtain your production API key
6. Use this key with the production API at `https://production-api.capa.fi`

<Info>If you run into any issues during the onboarding process, don't hesitate to contact us at [onboarding@capa.fi](mailto:onboarding@capa.fi) or [juanda@capa.fi](mailto:juanda@capa.fi).</Info>

## 🔄 Regenerating Your API Key

If you need to regenerate your API key, log in to the partners dashboard at [dashboard.capa.fi](https://dashboard.capa.fi) (production) or [sandbox.capa.fi](https://sandbox.capa.fi) (sandbox), go to **Settings > Dev Tools**, and click **Regenerate API Key**. It's a quick and easy process to ensure your integration remains secure in case there is any issue with the integrity of your API Key. 🔑

## 🔍 Using Your API Key

To authenticate your requests, you need to include your API key in the headers of every HTTP request you make to our API.

### Example Request with API Key

Include your API key in the request header under the `partner-api-key` field.

```Text bash theme={null}
curl -X GET 'https://api.sandbox.capa.fi/api/partner/v2/transactions' \
  -H 'partner-api-key: YOUR_API_KEY_HERE'
```

### 🔄 Header Format

```Text http theme={null}
partner-api-key: YOUR_API_KEY_HERE
```

Replace **YOUR\_API\_KEY\_HERE** with the actual API key provided to you.

## 🚨 Important Security Notes

* **Keep Your API Key Secure:** Treat your API key like a password. Do not share it publicly or expose it in client-side code (e.g., JavaScript, HTML). 🛡️

<Danger>If you suspect that your API key has been compromised, please contact us **immediately**. We will promptly issue a new key to ensure your account's security.</Danger>
