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

# Authentication

> How to authenticate with the Mindo API using your API Key

# Authentication

All requests to the Mindo API require authentication via an API Key sent in the `X-API-Key` header.

## Authentication header

```
X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx
```

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.mindosoftware.com/api/v1/business-accounts/ \
    -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
  ```

  ```python Python theme={null}
  import requests

  headers = {
      "X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
  }

  response = requests.get(
      "https://api.mindosoftware.com/api/v1/business-accounts/",
      headers=headers
  )
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.mindosoftware.com/api/v1/business-accounts/",
    {
      headers: {
        "X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  );
  ```
</CodeGroup>

## Authentication errors

| Code  | Message                                                                 | Cause                                                   |
| ----- | ----------------------------------------------------------------------- | ------------------------------------------------------- |
| `401` | `"Este endpoint requiere autenticacion con API Key (header X-API-Key)"` | The `X-API-Key` header was not sent                     |
| `401` | `"API Key expirada"`                                                    | The API Key has expired or was revoked                  |
| `403` | `"API Key no tiene acceso a este recurso"`                              | The API Key does not have permissions for this endpoint |

<Warning>
  **API Key security**

  * Never expose your API Key in client-side code (frontend, mobile apps).
  * Use environment variables to store it in your applications.
  * Rotate your API Key periodically from the [Dashboard](https://app.mindosoftware.com).
  * If you believe your API Key has been compromised, revoke it immediately from the Dashboard.
</Warning>
