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

# API Introduction

> Getting started with the Libredesk API

You can access the Libredesk API to interact with your instance programmatically by generating API keys for any agent.

<Note>
  If you come across API calls that are yet to be documented, Please consider contributing to docs.
</Note>

## Authentication

The API supports two authentication methods:

### Basic Authentication

```bash theme={null}
curl -X GET "https://your-instance.com/api/v1/endpoint" \
  -H "Authorization: Basic <base64_encoded_api_key:api_secret>"
```

### Token Authentication

```bash theme={null}
curl -X GET "https://your-instance.com/api/v1/endpoint" \
  -H "Authorization: token api_key:api_secret"
```

## Getting API Keys

1. Go to **Admin → Teammate → Agent → Edit**
2. Generate a new API key
3. Save both the API Key and API Secret

## Base URL

```
https://your-instance.com/api/v1
```

## Response Format

All API responses are returned in JSON format.
