API Reference
Consent Endpoints
Consent API Endpoints
These endpoints handle consent recording, event tracking, and pageview analytics. They are public (no auth required) but bot-filtered.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/consent/ | Record user consent choice |
| POST | /api/consent/events | Track custom event |
| POST | /api/consent/events/pre-consent | Track event before consent decision |
| POST | /api/consent/conversions | Server-side conversion tracking |
| POST | /api/consent/pageview | Record page view |
| POST | /api/consent/session/end | End user session |
| GET | /api/consent/:clientId | Get consent status (auth required) |
| POST | /api/collect | Batch events (SDK v2) |
Record Consent
bash
POST /api/consent/
{
"clientId": "conseto_yoursite_xxx",
"sessionId": "session_abc123",
"consent": {
"necessary": true,
"analytics": true,
"marketing": false,
"preferences": true
},
"region": "EU",
"regulation": "GDPR"
}