> ## 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>
  If you come across API calls that are yet to be documented, Please consider contributing to docs.
</Note>

## Generating API Keys

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

  <Step title="Generate new API key">
    An API Key and API Secret will be generated for the agent
  </Step>

  <Step title="Save the credentials">
    Keep both the API Key and API Secret secure
  </Step>

  <Step title="Key management">
    You can revoke / 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 Documentation

The complete API documentation with all endpoints is available in the [API Reference](/api-reference/introduction) section of this documentation.

<Card title="View API Reference" icon="code" href="/api-reference/introduction">
  Explore the complete interactive API documentation
</Card>
