Getting consent lists
You can download a complete list of marketing consents granted by your customers. Find this feature under Settings > Consents > Consents.
Want to learn more about how consent lists work? Check out our Customer consents guide.
GET method
The GET method retrieves a list of all current consents along with their properties.
Endpoint
The endpoint for GET requests is: https://api.ecdp.app/customerconsents
Request parameters
| Parameter | Required | Type | Used in | Description | 
| x-api-key | yes | string | header | Your API key, which you can find in Settings > API. | 
What data will be included in the response?
The response to a correctly submitted request contains the following data:
| Parameter | Type | Description | 
| id | Integer($int32) | Consent list’s identification number – the same one you see under Settings > Consents > Consents. | 
| name | string | A name that you assigned to a consent list in Settings > Consents > Consents. | 
| type | string | Consent type with its properties: General, Email, Sms. | 
Response codes
200: Success
Your request was processed successfully, and the server returned the data.
Sample response:
{
  "status": 0,
  "data": [
    {
      "id": 0,
      "name": "string",
      "type": "string"
    }
  ]
}401: Unauthorized
Your request was missing an API key, or you’re trying to access information you don’t have permission to view.
Sample response:
{
  "type": "string",
  "title": "string",
  "status": 0,
  "substatus": "CustomerInvalidModelState",
  "detail": "string",
  "instance": "string"
}