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

# Authentication

> Authenticate SoluDesks API requests with API keys.

SoluDesks API requests use API key authentication.

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

The OpenAPI security scheme is named `apiKeyAuth` and maps to the `Authorization` header.

## Key Modes

For the currently documented LearnHub endpoints:

| Mode                     | What it accesses                              | Notes                                                                                                               |
| ------------------------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Tenant API key           | Tenant LearnHub data                          | Requires LearnHub to be enabled and checks key permissions such as `learnhub.view_course` or `learnhub.add_course`. |
| Service-provider API key | Service-provider-owned admin training content | Shares the same endpoint family. Unsupported tenant-only resources return a permission-style error.                 |

<Warning>
  Never expose API keys in browser code, mobile apps, public repositories, logs, or customer-visible configuration.
</Warning>

## Example

```bash theme={null}
curl "https://staging.api.soludesks.com/v1/external/learnhub/categories" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Error Shape

Authentication failures use the standard error envelope:

```json theme={null}
{
  "status": 401,
  "success": false,
  "code": "AUTHENTICATION_FAILED",
  "message": "Authentication failed.",
  "data": null,
  "errors": []
}
```
