Skip to main content

API Reference

Powerful REST API to manage consent programmatically

Secure by Default

All API requests require authentication via API keys

Lightning Fast

Global CDN with <50ms response times worldwide

RESTful Design

Standard HTTP methods and JSON responses

Base URL

https://api.snapconsent.com/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from the dashboard settings.

Endpoints

Consent Records

Manage visitor consent records

Core API
GET/consents

List all consent records

GET/consents/{id}

Get a specific consent record

POST/consents

Create a new consent record

PUT/consents/{id}

Update consent preferences

Sites

Manage your websites

Management
GET/sites

List all sites

POST/sites

Create a new site

PUT/sites/{id}/config

Update site configuration

Analytics

Access consent analytics data

Analytics
GET/analytics/summary

Get consent rate summary

GET/analytics/trends

Get consent trends over time

Code Examples

cURL

curl -X GET \
  https://api.snapconsent.com/v1/consents \
  -H "Authorization: Bearer YOUR_API_KEY"

JavaScript

const response = await fetch(
  'https://api.snapconsent.com/v1/consents',
  { headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  } }
);

Rate Limits

PlanRequests/HourBurst
Starter1,000100/min
Professional10,000500/min
EnterpriseUnlimitedCustom

Ready to integrate?

Get your API key and start building in minutes