# Authentication

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can generate an API key from your Dashboard at any time.

The API key must be included as `X-API-Key` HTTP header in requests.

**Python Example**

```python
import requests

url = "https://api.connectly.ai/v1/businesses/<business_id>/send/whatsapp_templated_messages"
headers = {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'X-API-Key': '<YOUR_KEY_HERE>'  # <------ Replace by your API key
}
payload = {
    # Your payload here
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

**JavaScript Example**

```javascript
const axios = require('axios');

const url = "https://api.connectly.ai/v1/businesses/<business_id>/send/whatsapp_templated_messages";
const headers = {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'X-API-Key': '<YOUR_KEY_HERE>'  //  <----- Replace by your API key
};
const data = {
    // Your payload here
};

axios.post(url, data, { headers: headers })
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error(error);
    });
```

Replace


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.connectly.ai/quick-start/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
