> ## 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 Getting Started

> Access the Libredesk API to interact with your instance programmatically

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

<Note>
  Some endpoints are not documented yet. Pull requests to the docs are welcome.
</Note>

## Generating API keys

<Steps>
  <Step title="Edit agent">
    Go to **Admin → Teammate → Agent → Edit**
  </Step>

  <Step title="Generate new API key">
    Libredesk shows an API key and an API secret for that agent
  </Step>

  <Step title="Save the credentials">
    Keep both the API key and API secret secure
  </Step>

  <Step title="Key management">
    You can revoke or regenerate API keys at any time from the same page
  </Step>
</Steps>

## Using the API

Libredesk supports two authentication schemes:

### Basic authentication

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

### Token authentication

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

## API reference

Every documented endpoint is listed in the [API reference](/api-reference/introduction).

<Card title="View API reference" icon="code" href="/api-reference/introduction">
  Browse endpoints with request and response examples
</Card>
