Quickstart

๐Ÿš€ Quickstart Guide

1. Get Your API Key

First, create an API key using your Master Key:

curl -X POST https://api.consentkeep.com/api-keys \
  -H "Content-Type: application/json" \
  -H "X-Master-Key: your_master_key" \
  -d '{"customerId":"your_customer_id"}'
 
Response:
 
  {
  "success": true,
  "data": {
    "api_key": "ck_xxxxx_yyyyy",
    "customer_id": "your_customer_id",
    "plan": "free",
    "requests_limit": 1000
  }
}

โš ๏ธ Save your API key immediately โ€” it won't be shown again!

2. Log Your First Consent

Add this code to your website:

<script>
  document.addEventListener('DOMContentLoaded', function() {
    const consentKey = localStorage.getItem('consent_given');
    
    if (consentKey === 'true') {
      fetch('https://api.consentkeep.com/api/v1/consent', {
        method: 'POST',
        headers: {
          'X-API-Key': 'your_api_key_here',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          consent_given: true,
          purposes: ['analytics', 'functional'],
          origin_url: window.location.href
        })
      })
      .then(res => res.json())
      .then(data => console.log('โœ… Consent logged:', data.id));
    }
  });
</script>
 

3. View Your Data

Open the dashboard to see your consent logs:

๐Ÿ‘‰ https://dash.consentkeep.com (opens in a new tab)

4. What Happens Next?

  • ๐Ÿ”’ IP is hashed with daily salt โ€” GDPR compliant
  • ๐Ÿ“ธ Screenshot is captured automatically (cookie banner)
  • ๐Ÿ“Š Data appears in your dashboard within seconds

You're all set! ๐ŸŽ‰