ConsentGuard API Documentation
Integrate ConsentGuard into your applications using our secure and developer-friendly APIs.
Quick Start
Follow these steps to begin integrating the ConsentGuard API:
- Create your ConsentGuard account
- Generate your API key from the dashboard
- Add the API key to request headers
- Start sending consent data securely
Authentication
All API requests must include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Keep your API key secure and never expose it in public client-side code.
Core API Endpoints
POST
/api/v1/consentsCreate and store a new user consent record.
GET
/api/v1/consents/{userId}Retrieve consent details for a specific user.
PUT
/api/v1/consents/{userId}Update user consent preferences.
DELETE
/api/v1/consents/{userId}Withdraw and deactivate user consent.
Example Request
curl -X POST https://api.consentguard.com/api/v1/consents \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"userId": "12345",
"email": "user@example.com",
"consents": {
"analytics": true,
"marketing": false
}
}'
SDK & Integration
- REST API support for all platforms
- JavaScript and Node.js integration examples
- Webhook support for consent updates
- Sandbox environment for testing
Start Building with ConsentGuard
Generate your API key and integrate consent management into your applications today.