Consent Settings
Configure consent management rules and pull per-record analytics. CRUD endpoints manage CMP rules, regional overrides, and vendor categorization; analytics endpoints return time-series, per-page, and per-region rollups of banner views, opt-ins, opt-outs, and dismissals.
Configure consent management rules, then pull analytics for any configured CMP record. The CRUD endpoints manage rules, regional overrides, and vendor categorization. The analytics endpoints expose per-record time-series, per-page, and per-region rollups of banner views, opt-ins, opt-outs, and dismissals.
AI assistants can use the same surface through MCP tools such as create_consent_setting, get_consent_setting, update_consent_setting, replace_consent_setting, delete_consent_setting, get_consent_analytics_by_region, and get_consent_page_analysis. See MCP Server (platform) for setup and prompt examples.
GET/rest/v1/consent-settings
Authorization
apiKey Ours Privacy API key
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/consent-settings"{ "entities": [ { "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "deviceIdCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ] } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}POST/rest/v1/consent-settings
Authorization
apiKey Ours Privacy API key
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rest/v1/consent-settings"{ "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "deviceIdCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}GET/rest/v1/consent-settings/{id}
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/consent-settings/string"{ "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "deviceIdCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}PATCH/rest/v1/consent-settings/{id}
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/rest/v1/consent-settings/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "deviceIdCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}PUT/rest/v1/consent-settings/{id}
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/rest/v1/consent-settings/string" \ -H "Content-Type: application/json" \ -d '{ "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "categories": [ { "key": "string", "value": { "enabled": true } } ], "language": "en", "mode": "opt_in", "translations": [ { "language": "en", "value": {} } ] }, "name": "string", "regions": [ { "regionCode": "US-CA", "rule": { "categories": [ { "key": "string", "value": { "enabled": true } } ], "language": "en", "mode": "opt_in", "translations": [ { "language": "en", "value": {} } ] } } ], "services": [ { "internalNotes": "string", "label": "string" } ], "status": "Disabled" }'{ "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "deviceIdCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}DELETE/rest/v1/consent-settings/{id}
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/rest/v1/consent-settings/string"{ "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "deviceIdCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}GET/rest/v1/consent-settings/{id}/analytics
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Query Parameters
Inclusive lower bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 90 days or fewer (14 for HOURLY granularity).
^\d{4}-\d{2}-\d{2}$Inclusive upper bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 90 days or fewer (14 for HOURLY granularity).
^\d{4}-\d{2}-\d{2}$Bucket size for the time-series rollup. DAILY (default) buckets per UTC day; HOURLY buckets per UTC hour and limits the window to 14 days.
Value in
- "DAILY"
- "HOURLY"
Filter to events whose default_properties.pathname equals this value (exact match, case-sensitive). Use this to drill into a single page.
1 <= length <= 2048Filter results to events whose request_context.country_region_name is in this set. Pass a single region (e.g. California) or a comma-separated list (California,Texas). Case-sensitive. Use GET /rest/v1/consent-settings/{id}/analytics-by-region to discover the region names available for an account.
When true, each bucket also returns the matching bucket from the immediately preceding window of equal length (in previous* and percentageChange* fields). Defaults to false.
Optional custom comparison-window lower bound, as a UTC calendar day in YYYY-MM-DD format. Provide together with comparisonTo; the window between them must be the same length as from–to (a mismatch returns 400). When omitted (with compareWithPreviousPeriod=true), the immediately preceding equal-length period is used.
^\d{4}-\d{2}-\d{2}$Optional custom comparison-window upper bound, as a UTC calendar day in YYYY-MM-DD format. Provide together with comparisonFrom; the window must match the from–to length. Ignored unless both comparison bounds are supplied.
^\d{4}-\d{2}-\d{2}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/consent-settings/string/analytics?from=2026-04-01&to=2026-04-30"{ "items": [ { "dateTime": "string", "bannerViews": 0, "explicitOptIns": 0, "explicitOptOuts": 0, "closeIconClicks": 0, "optInRate": 0, "optOutRate": 0, "previousBannerViews": 0, "previousExplicitOptIns": 0, "previousExplicitOptOuts": 0, "previousCloseIconClicks": 0, "previousOptInRate": 0, "previousOptOutRate": 0, "percentageChangeBannerViews": 0, "percentageChangeExplicitOptIns": 0, "percentageChangeExplicitOptOuts": 0, "percentageChangeCloseIconClicks": 0 } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}GET/rest/v1/consent-settings/{id}/page-analysis
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Query Parameters
Inclusive lower bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 90 days or fewer (14 for HOURLY granularity).
^\d{4}-\d{2}-\d{2}$Inclusive upper bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 90 days or fewer (14 for HOURLY granularity).
^\d{4}-\d{2}-\d{2}$Case-sensitive substring match against default_properties.pathname. Wrapped in %...% server-side.
1 <= length <= 2048Filter results to events whose request_context.country_region_name is in this set. Pass a single region (e.g. California) or a comma-separated list (California,Texas). Case-sensitive. Use GET /rest/v1/consent-settings/{id}/analytics-by-region to discover the region names available for an account.
Maximum number of pages to return. Defaults to 50.
1 <= value <= 500Skip this many top-ranked pages before returning. Use together with limit for load-more pagination.
0 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/consent-settings/string/page-analysis?from=2026-04-01&to=2026-04-30"{ "items": [ { "page": "string", "bannerViews": 0, "optOuts": 0, "closeIconClicks": 0, "optOutRate": 0 } ], "total": 0, "hasMore": true}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}GET/rest/v1/consent-settings/{id}/analytics-by-region
Authorization
apiKey Ours Privacy API key
In: header
Path Parameters
Query Parameters
Inclusive lower bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 90 days or fewer (14 for HOURLY granularity).
^\d{4}-\d{2}-\d{2}$Inclusive upper bound of the analytics window, as a UTC calendar day in YYYY-MM-DD format. The window between from and to must be 90 days or fewer (14 for HOURLY granularity).
^\d{4}-\d{2}-\d{2}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rest/v1/consent-settings/string/analytics-by-region?from=2026-04-01&to=2026-04-30"{ "regions": [ { "regionName": "string", "bannerViews": 0, "explicitOptIns": 0, "explicitOptOuts": 0, "closeIconClicks": 0, "optInRate": 0, "optOutRate": 0 } ]}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}{ "error": "string", "details": "string"}How is this guide?

