Quick Start
1. Register for access
To start using the Consent Management API, you must first register for access:
- Fill out the registration form: https://forms.office.com/r/0nFLVmS5U4
- Wait for credentials: Our team will generate and provide you with:
- Alias
- Password for login
2. Obtain API key
After registration, you can generate your x-api-key yourself via the Consentrix Backoffice.
3. Verify connectivity
Set API_ORIGIN to the host provided for your environment. Do not include /api or a trailing slash.
export API_ORIGIN="https://your-consentrix-host"
curl -sS "${API_ORIGIN}/api/health"
A successful response is a JSON object with status and success fields.
4. Fetch a published template version
Replace YOUR_KEY with your actual API key:
curl -sS \
-H "x-system-api-key: YOUR_KEY" \
"${API_ORIGIN}/api/v1/consent-templates/YOUR_TEMPLATE_CODE/latest"
Expected success response:
{
"data": {
"consent_version_id": "123e4567-e89b-12d3-a456-426614174010",
"version": 1,
"tag": "1.0.0",
"content_html": "<html>...</html>",
"file_url": "https://example.com/content.html",
"allow_reconsent": true
}
}
Try Get latest consent template version API ↩
5. Submit a consent decision
curl -sS -X POST \
-H "Content-Type: application/json" \
-H "x-system-api-key: YOUR_KEY" \
"${API_ORIGIN}/api/v1/customers/CUSTOMER_ID/consents/decisions" \
-d '{
"consent_version_id": "123e4567-e89b-12d3-a456-426614174010",
"decision": "given"
}'
Try Submit consent decision API ↩
6. Errors
Error response format:
{
"code": "1002",
"message": "Unauthorized."
}
See API conventions for full error codes.
Request URL
Build request URLs from the environment-specific origin and the fixed /api base path:
{API_ORIGIN}{REQUEST_PATH}
For example, request path /api/v1/consent-templates/{template_code}/latest
becomes {API_ORIGIN}/api/v1/consent-templates/{template_code}/latest.
API endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /api/health | Health check |
GET | /api/v1/consent-templates/{template_code}/latest | Latest published template |
GET | /api/v1/customers/{customer_id}/consents/templates/{template_code}/pending | Check if customer has unaccepted update |
POST | /api/v1/customers/{customer_id}/consents/decisions | Submit decision |
What you need to implement
Before your integration is live, complete these steps on your side:
In Consentrix Backoffice (consentrix-portal.odt.co.th)
- Create a Consent Template — define the policy text customers must agree to (e.g., "Marketing Communications Policy")
- Publish a Template Version — publish the version to make it available via API
- Generate an API Key — go to Administration → API Key Management, create a key scoped to your system
In your application
- On first interaction — call
GET /api/v1/consent-templates/{template_code}/latestand show the consent content to the user - Record the decision — call
POST /api/v1/customers/{customer_id}/consents/decisionswith the user'sgiven,reject, orwithdrawchoice - On subsequent visits — call
GET /api/v1/customers/{customer_id}/consents/templates/{template_code}/pendingto check if the user has a pending update they haven't seen yet; ifaccepted: false, show the new template content and repeat step 5