Official client documentation and React Native example for the Axeptio Headless Consent Management Platform.
Axeptio Headless CMP lets you build your own consent UI on top of a privacy-compliant backend — collect, store, and retrieve GDPR/CCPA consent without being locked into a widget.
| Environment | Swagger UI | OpenAPI JSON |
|---|---|---|
| Production | https://headless-api.axeptio.tech/mobile/docs | https://headless-api.axeptio.tech/mobile/swagger.json |
| Staging | https://staging-api.axeptio.tech/mobile/docs | https://staging-api.axeptio.tech/mobile/swagger.json |
Widget API spec: https://staging-api.axeptio.tech/mobile/swagger/widget.json
Every endpoint in the table below requires Authorization: Bearer YOUR_API_TOKEN, except
/public/geolocation/{projectId} and its .js settings-snippet variant. The documentation routes
(/mobile/docs, /mobile/swagger.json), /mobile/changelog and /api/health are also
unauthenticated.
Base URL: https://headless-api.axeptio.tech. Paths are shown in full, including their
/mobile or /public prefix.
| Method | Path | Description |
|---|---|---|
POST |
/mobile/consents/{projectId}/{collection}/{configId} |
Submit a consent record |
GET |
/mobile/client/{projectId}/consents/{token} |
Retrieve consent status for a user token |
GET |
/mobile/configurations/{projectId} |
Mobile-optimized project configuration |
GET |
/mobile/token |
Generate a secure consent token |
GET |
/mobile/auth/me |
Validate bearer token + get project/tier info |
GET |
/mobile/vendors/{projectId} |
All vendors for a project |
GET |
/mobile/vendors/{projectId}/categories |
Purpose-step categories of the default configuration |
GET |
/mobile/vendors/{projectId}/{configId} |
Config-specific vendor list |
GET |
/mobile/vendors/{projectId}/{configId}/categories |
Purpose-step categories for a configuration |
GET |
/mobile/geolocation/{projectId} |
Resolve country, regulation and applicable config |
GET |
/public/geolocation/{projectId} |
Same, unauthenticated (.js variant returns a GTM settings snippet) |
GET |
/mobile/terms/{projectId}/{configId} |
Terms & Conditions content (/pdf for the PDF) |
POST |
/mobile/analytics/evts |
Submit analytics events (single or batch) |
GET |
/mobile/health |
Service health (Bearer required; use GET /api/health unauthenticated) |
Collections for consent submission: cookies · processings · terms (alias of contractsV2)
An IAB TCF suite (/mobile/tcf/*), project statistics (GET /stats) and an API changelog
(GET /mobile/changelog) are also live; see the Swagger UI above until they are documented here.
cd examples/react-native
npm install
npm startconst PROJECT_ID = 'your_project_id';
const API_TOKEN = 'your_api_token';
const BASE_URL = 'https://headless-api.axeptio.tech';
// 1. Get a consent token
const { token } = await fetch(`${BASE_URL}/mobile/token`, {
headers: { Authorization: `Bearer ${API_TOKEN}` }
}).then(r => r.json());
// 2. Fetch configuration to get configId
const { defaultConfigId } = await fetch(`${BASE_URL}/mobile/configurations/${PROJECT_ID}`, {
headers: { Authorization: `Bearer ${API_TOKEN}` }
}).then(r => r.json());
// 3. Submit consent
await fetch(`${BASE_URL}/mobile/consents/${PROJECT_ID}/cookies/${defaultConfigId}`, {
method: 'POST',
headers: {
Authorization: `Bearer ${API_TOKEN}`,
'Content-Type': 'application/json',
'x-mobile-platform': 'react-native',
},
body: JSON.stringify({
accept: true,
token,
// keys are vendor `name` slugs from GET /mobile/vendors/{projectId}
preferences: { vendors: { google_analytics: true, facebook_pixel: false } },
}),
});
// 4. Read consent back
const consent = await fetch(
`${BASE_URL}/mobile/client/${PROJECT_ID}/consents/${token}?identifier=${defaultConfigId}&service=cookies`,
{ headers: { Authorization: `Bearer ${API_TOKEN}` } }
).then(r => r.json());| Section | Description |
|---|---|
| Quick Start | 5-minute setup guide |
| Authentication | Bearer tokens, secure storage, error handling |
| API Reference | Full endpoint catalog, rate limits, error codes |
| Geolocation | Resolve country, regulation and the applicable configuration |
| Terms & Conditions | Fetch published terms content or PDF, and record acceptance |
| React Native Guide | useConsent hook, offline queue, Google Consent Mode |
| Mobile Integration Reference | Comprehensive multi-platform reference (iOS, Android, RN) |
| WebView Consent Sharing | Share consent into a Custom Tab / WebView via ?axeptio_token= so the web widget stays hidden |
examples/react-native/ — A minimal Expo demo with a custom consent modal, vendor toggles, and direct API integration. No SDK required.
MIT — see LICENSE.