API Authentication

Learn how to authenticate your requests to the CX Tools API.

Overview

CX Tools API uses API keys to authenticate requests. You can manage your API keys from your dashboard. All API requests must be made over HTTPS and include your API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Getting Your API Key

To get your API key:

  1. Log in to your CX Tools account
  2. Navigate to API Settings in your dashboard
  3. Click "Generate New Key"
  4. Copy and securely store your API key

Important: Keep your API keys secure and never share them publicly. If a key is compromised, you can revoke it immediately from your dashboard.

Example Requests

cURL

curl https://cxtools.xyz/api/v1/endpoint \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

JavaScript

fetch('https://cxtools.xyz/api/v1/endpoint', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
})

PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://cxtools.xyz/api/v1/endpoint");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer YOUR_API_KEY",
    "Content-Type: application/json"
]);

Authentication Errors

The API will return these errors for authentication issues:

401 Unauthorized
{
    "error": "Invalid API key"
}

403 Forbidden
{
    "error": "API key does not have access to this resource"
}

Next Steps

Now that you understand authentication, learn about our API rate limits and explore the available endpoints.