Consent endpoint
Certain regulations require explicit customer consent before their personal data can be collected. The /consent endpoint in the Privacy Service API allows you to process customer consent requests and integrate them into your privacy workflow.
Before using this guide, please refer to the getting started guide for information on the required authentication headers presented in the example API call below.
Process a customer consent request
Consent requests are processed by making a POST request to the /consent endpoint.
API format
POST /consent
Request
The following request creates a new consent job for the user IDs provided in the entities array.
curl -X POST \
https://platform.adobe.io/data/core/privacy/consent \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-d '{
"optOutOfSale": true,
"entities": [
{
"nameSpace": "email",
"values": [
"dsmith@acme.com",
"ajones@acme.com"
]
},
{
"nameSpace": "ECID",
"values": [
"443636576799758681021090721276"
]
}
]
}'
optOutOfSaleentities wish to opt-out of the sale or sharing of their personal data.entitiesnamespace and an array of values to match individual users with that namespace.nameSpaceentities array must contain one of the standard identity namespaces recognized by the Privacy Service API.valuesnameSpace.Response
A successful response returns HTTP status 202 (Accepted) with no payload, indicating that the request was accepted by Privacy Service and is undergoing processing.