Learn how to authenticate your requests to the CX Tools API.
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
To get 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.
curl https://cxtools.xyz/api/v1/endpoint \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
fetch('https://cxtools.xyz/api/v1/endpoint', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
})
$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"
]);
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"
}
Now that you understand authentication, learn about our API rate limits and explore the available endpoints.