API overview
The OptSens REST API v1 provides machine-to-machine access to consent records, consent statistics, domain information and cookie declarations, plus webhooks for real-time event notifications.
Availability: the REST API and webhooks are included in the Business and Custom plans.
Base URL:
https://api.optsens.com/api/v1
What you can do
| Task | Endpoint |
|---|---|
| Check a visitor's consent | Get consent status |
| List all consent records | List consents |
| Read domain info | Get domain info |
| Read the cookie declaration | List cookies |
| Consent analytics | Consent statistics |
| Export consents (JSON/CSV) | Export consents |
| Consent proof PDF (GDPR Art. 7) | Consent proof PDF |
| Right to erasure | Delete consent |
| Real-time notifications | Webhooks |
Privacy by design
The API never returns PII collected from visitors: ip_address,
user_agent and client details are stripped from every response. The
consent proof PDF shows the IP address only in masked form. Internal
database IDs and the public CDN key are never exposed.
Download the specification
The full OpenAPI specification is available for download: optsens-v1.yaml.
Each endpoint page includes an interactive request runner with code samples. Start with Authentication.