# Cloudflare API Keys

### Setting Up Cloudflare API Key for SenderAI Server Creation

To streamline DNS configurations, **SenderAI** integrates with Cloudflare using API keys. This integration enables automatic DNS record management, improving email authentication and deliverability for large-scale campaigns. Here’s a step-by-step guide to setting up your Cloudflare API key in **SenderAI**.

<figure><img src="https://3105319611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC0itf53N6qCT1XIxmRvh%2Fuploads%2FRP6ItJpG2Du8RRxMNMXx%2Fimage.png?alt=media&#x26;token=d9af1580-864f-4f1c-8bf0-f12dd07349f0" alt=""><figcaption></figcaption></figure>

***

### **Why Integrate Cloudflare with SenderAI?**

Managing DNS records manually can be time-consuming and error-prone, especially when working with multiple IPs and domains. By integrating Cloudflare with SenderAI, you can:

* **Seamlessly configure DNS entries** (e.g., SPF, DKIM, and DMARC) to enhance email authentication.
* **Automate DNS updates**, reducing manual effort.
* Improve email deliverability by ensuring proper DNS setups.

***

### **Handling the Missing Cloudflare Keys Error**

If you click the **Create SMTP** button without entering the Cloudflare keys, the following error appears:

{% hint style="danger" %}
**"Cloudflare keys are necessary, please enter this information on the Cloudflare page."**
{% endhint %}

<figure><img src="https://3105319611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC0itf53N6qCT1XIxmRvh%2Fuploads%2FsBIJgZupbvFfHVUtpwhm%2Fimage.png?alt=media&#x26;token=1b2cf50a-3cb1-458e-9625-45e921ba7f4f" alt=""><figcaption></figcaption></figure>

#### **Steps to Fix**

* **Navigate to Cloudflare Keys Page**: Click the **Cloudflare Keys** button or go to the settings.
* **Enter Credentials**: Provide your **Cloudflare** **API Key** and **email address**.
* **Save Changes**: Click **Save Changes** to activate integration.
* **Retry**: Go back and click **Create SMTP** again.

***

### **Step 1: Retrieve Your Cloudflare API Key**

1. Log in to your Cloudflare account.
2. Navigate to the **My Profile** section from the account dropdown menu.
3. Select the **API Tokens** tab.
4. Choose the **Global API Key**, click the **View** button to display the key, or select **Change** if you wish to update it.
5. Copy the API key for integration.

***

<figure><img src="https://3105319611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC0itf53N6qCT1XIxmRvh%2Fuploads%2FCnQT820ys8PDLf8xi1Og%2Fimage.png?alt=media&#x26;token=c3c6b48c-3953-46d3-8dde-669a43fa2e6f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3105319611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC0itf53N6qCT1XIxmRvh%2Fuploads%2FOZ01Br0PLb9sb4DmuKZh%2Fimage.png?alt=media&#x26;token=e4b07a7f-f771-44a0-90f4-08cf5e46e4c8" alt="" width="375"><figcaption></figcaption></figure>

***

### **Step 2: Configure Cloudflare API Key in SenderAI**

1. **Access SenderAI Dashboard**: Log in to your SenderAI account and navigate to the **Cloudflare Keys** section under settings.
2. **Enter Cloudflare Credentials**:
   * **API Key**: Paste the API key retrieved from Cloudflare.
   * **Cloudflare Email**: Enter the email address associated with your Cloudflare account.
3. **Save Changes**: After entering the details, click **Save Changes** to activate the integration.

***

### **Step 3: Benefits of Cloudflare Integration**

Once the Cloudflare API key is set up, SenderAI can:

* Automatically configure DNS records such as SPF, DKIM, and DMARC for new domains.
* Ensure consistent and error-free DNS updates, saving time and effort.

***

### **Final Thoughts**

Integrating Cloudflare with SenderAI is essential for optimizing email campaigns, especially when managing multiple IPs and domains. By automating DNS and rDNS configurations, this setup enhances deliverability, minimizes manual work, and ensures seamless management of your email infrastructure.

For any questions or assistance, feel free to contact the **SenderAI** support team.


---

# 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.senderwiz.com/popular-topics/senderai/cloudflare-api-keys.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.
