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

# Authentication

> Integrate with the Lemma API as a platform and authenticate your requests.

<Note>
  The Lemma API is currently in beta. If you're interested in integrating with
  Lemma as a platform, reach out to the Lemma team at
  [contact@getlemma.com](mailto:contact@getlemma.com) to get started.
</Note>

## How it works

The Lemma API is designed for **platform integrations**. As a platform, you integrate with Lemma directly and receive API keys from the Lemma team. Your customers — the businesses that hold Lemma accounts — then grant your platform permission to access their data through Lemma.

Here's the flow:

1. You receive an API key from Lemma
2. Your customer logs in with their Lemma credentials and grants your platform permission to view their accounts
3. You use your API key to access the customer's data on their behalf

### Customer-granted permissions

Your platform can only access data that the customer has explicitly authorized. When a customer grants access, they choose which accounts your platform can see.

For sensitive actions like moving money, customers are required to limit the permission to specific accounts. This means:

* If a customer creates a new account on their Lemma dashboard (e.g., a savings account), your platform will **not** automatically have access to it — the customer must explicitly grant access.
* However, you **will** still see transactions on accounts you do have access to, including transfers made to or from accounts you cannot see. For example, if a customer moves money from an account you can access into a savings account you cannot, the outgoing transaction will still be visible.

## Getting an API key

API keys are issued directly by the Lemma team as part of your platform onboarding. Contact [contact@getlemma.com](mailto:contact@getlemma.com) to begin the integration process.

<Warning>
  Store your API key securely. Do not share it or commit it to source control.
  If you believe a key has been compromised, contact the Lemma team immediately
  to revoke it and issue a new one.
</Warning>

## Using your API key

Include the key in the `Authorization` header of every request using the `Bearer` scheme:

```bash theme={null}
curl https://api.getlemma.com/v0/accounts \
  -H "Authorization: Bearer your_api_key"
```

## Rate limits

The API allows up to **500 requests per minute** per API key. If you need higher limits, [contact us](mailto:contact@getlemma.com) and we're happy to increase them. See the [introduction](/api-reference/introduction#rate-limits) for more details.

## Revoking a key

If you need to revoke an API key, contact the Lemma team at [contact@getlemma.com](mailto:contact@getlemma.com). Revoked keys stop working immediately and any requests using that key will begin receiving `401` responses.
