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

# Authentication

> Learn how to authenticate with the Carbon Business API.

The Carbon Business API uses API key-based authentication. Every request to the API must include the `apikey`and `x-carbon-key` headers with your API key.

## Authentication Methods

### `apikey`

The `apikey` is a security scheme used to authenticate requests. It must be included in the request header as `apikey`. This key is provided by the Carbon Integration team and is required for all API interactions.

### `x-carbon-key`

The `x-carbon-key` is the header where your app API key is passed. It is generated via the developer page on Carbon Business. It is mandatory for every request to the Carbon Business API. Without this header, the API will reject the request with an authentication error.

***

## How to Get Your API Key

1. Get in touch with our [team via email: sme@getcarbon.co](mailto:sme@getcarbon.co)
2. Sign Up via the sandbox environment [Carbon Business developer portal](https://carbon-business-client-staging.getcarbon.co/).
3. Navigate to the Developer menu,  Top right Dropdown menu > Developer.
4. Generate a new CARBON\_API\_KEY > or use an existing one.

***

<Frame>
  <img src="https://mintcdn.com/carbonmicrofinancebank/uOs9-Uj0x_TahtAF/images/developer.png?fit=max&auto=format&n=uOs9-Uj0x_TahtAF&q=85&s=fa268c2d72d49a3a88a447eb2a8a28db" alt="developer" width="1595" height="256" data-path="images/developer.png" />
</Frame>

## Example

Include the `apikey` header in your requests:

```http theme={null}
apikey: YOUR_API_KEY
```

Include the `x-carbon-key` header in your requests:

```http theme={null}
x-carbon-key: CARBON_API_KEY
```

### Example Request

```http theme={null}
GET /v1/accounts HTTP/1.1
Host: {{BASE_URL}}
apikey: YOUR_API_KEY
x-carbon-key: CARBON_API_KEY
```

***

## Environments

| Environment | URL                                                                                                          |
| ----------- | ------------------------------------------------------------------------------------------------------------ |
| Live        | \[Production URL]                                                                                            |
| Sandbox     | [https://carbonapistagingsecure.getcarbon.co/baas/api](https://carbonapistagingsecure.getcarbon.co/baas/api) |
