API Authentication

Authenticate your requests to the Cookiewise API using API keys.

Overview

The Cookiewise API uses API keys for authentication. You can generate and manage your API keys from the Settings page in your dashboard.

Generating an API Key

  1. Log in to your Cookiewise dashboard
  2. Navigate to SettingsAPI Keys
  3. Click Generate New Key
  4. Copy and securely store your key — it will only be shown once
Important: Never expose your API key in client-side code or public repositories. Always use it server-side only.

Using Your API Key

Include your API key in the Authorization header of every request:

Authorization: Bearer YOUR_API_KEY

Example Request

curl -X GET https://www.cookiewise.net/api/websites \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Rate Limits

API requests are rate-limited to protect the service:

  • 100 requests per minute for general API endpoints
  • 5 requests per 15 minutes for authentication endpoints

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

Error Responses

If authentication fails, you'll receive a 401 Unauthorized response:

{ "error": "Authentication required" }