Consent Ledger REST API Reference
The Consent Ledger REST API provides high-throughput headless consent logging, server-to-server compliance synchronization, and verification endpoints.
Step 01: Ingest Headless Consent Proofโ
Record consent captures originating from native mobile apps, server-side renderers, or backend microservices:
curl -X POST https://app.consentshieldai.com/api/v1/consent \
-H "Authorization: Bearer YOUR_SECRET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"site_id": "CS-LIVE-PROD",
"anonymous_session_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"consent_state": {
"strictly_necessary": true,
"analytics": true,
"marketing": false,
"personalization": false
},
"ip_country": "US",
"ip_region": "CA",
"gpc_signal": false,
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)"
}'
Step 02: HTTP Status Codes Matrixโ
| HTTP Status | Meaning | Resolution |
|---|---|---|
201 Created | Consent recorded & cryptographic hash sealed. | Hash returned in proof_hash. |
400 Bad Request | Malformed payload or missing required site_id. | Verify JSON schema format. |
401 Unauthorized | Invalid or missing API Bearer token. | Refresh credentials in App Console. |
429 Rate Limited | Exceeded tenant tier requests/sec threshold. | Automatic backoff retry with exponential jitter. |
Enterprise Service Levels
Learn about our multi-region redundancy, 99.99% availability SLA, and P0 incident response commitments.